For the following problems, please select the correct answers. In each problem, you must have all the correct ones selected to have the full credits. Otherwise, no credits will be given.
Which of the following linear equations CANNOT be solved in integers?
154x + 260y = 5
108x + 30y = 7
45x + 14y = 1
621x + 736y = 46
For the following problems, please select the correct answers. In each problem, you must have all the correct ones selected to have the full credits. Otherwise, no credits will be given.
Which of the following statements is true?
Note that, giving two relations R and S where R is from set A to set B and S is from set B to set C. The composition of R and S, denoted by R o S, is the relation from A to C and, for all a ∈ A, c ∈C, a(S o R)c if there exists some b ∈ B such that aRb and bSc
The intersection of two equivalence relations is again an equivalence relation.
The union of two equivalence relations is again an equivalence relation.
If R1 and R2 are two symmetric relations on a set, then so is R1 o R2.
If R is a reflexive and transitive relation, then R o R is transitive.
Consider the following expressions in an infix form: 6 + 5 ∗ 3 − 4 − 8 + 6 ∗ 2
Please convert it in a postfix form.
Consider the following expressions in an infix form: 6 + 5 ∗ 3 − 4 − 8 + 6 ∗ 2
Please convert it in a prefix form.
Consider the following expressions in an infix form: 6 + 5 ∗ 3 − 4 − 8 + 6 ∗ 2
Please use the postfix form to evaluate this expression. You NEED to draw the sequence of stack configurations in the evaluation.
For a binary tree T, we use |T| to denote the number of nodes of T. If |T| = 0 or |T| = 1, there is only one binary tree. If |T| = 2, then there are two distinct binary trees. Please answer the following questions:
When |T| = 3, how many distinct binary trees are there? Please draw them.
For a binary tree T, we use |T| to denote the number of nodes of T. If |T| = 0 or |T| = 1, there is only one binary tree. If |T| = 2, then there are two distinct binary trees. Please answer the following questions:
In general, we would like to find the total number of distinct binary trees when |T| = n. Let Bn denote this number. Please write a recurrence equation of Bn.
For a binary tree T, we use |T| to denote the number of nodes of T. If |T| = 0 or |T| = 1, there is only one binary tree. If |T| = 2, then there are two distinct binary trees. Please answer the following questions:
Please obtain Bn in explicit form using the recurrence equation in (b).
Show that the language
L = {ambmcm | m ≥ 1}
over the alphabet Σ = {a, b, c} is not a context-free language.
Solve the recurrence relation an − 6an−1 + 9an−2 = 2n, if n ≥ 2, with initial conditions, a0 = 4 and a1 = 9
可觀看題目詳解,並提供模擬測驗!(免費會員無法觀看研究所試題解答)