Consider the following ANSI C function:
int SimpleFunction (int y[], int n, int x)
{
int total = y[0], loopIndex;
for (loopIndex = 1; loopIndex <= n - 1; loopIndex++)
total = x * total + y[loopIndex];
return total :
}
Let Z be an array of 10 elements with Z[i] = 1, for all i such that 0 ≤ i ≤ 9. The value returned by SimpleFunction (Z, 10, 2) is ______
For a Turing machine M, {M} denotes an encoding of M. Consider the following two languages.
L1 = {(M) | M takes more than 2021 steps on all inputs}
L2 = {(M) | M takes more than 2021 steps on some input}
Which one of the following options is correct?
In a pushdown automaton P = (Q, ∑, Γ, δ, q0, F), a transition of the form,
where p, q ∈ Q, a ∈ Σ ∪ {ϵ}, and X, Y ∈ Γ ∪ {ϵ}, represents
(q, Y) ∈ δ(p, a, X).
Consider the following pushdown automaton over the input alphabet ∑ = {a, b} and stack alphabet Γ = {#, A}.
The number of strings of length 100 accepted by the above pushdown automaton is ______