Discrete Math Quiz: Notation And Definitions
18 questions · exam conditions
0:00
Notation And DefinitionsQuestion 1 of 18

In a discrete optimization problem, a researcher defines the constraint set C={(x,y)Z2:x2+y225,x0,y0}C = \{(x,y) \in \mathbb{Z}^2 : x^2 + y^2 \leq 25, x \geq 0, y \geq 0\} and the objective function f(x,y)=3x+4yf(x,y) = 3x + 4y. When she writes max(x,y)Cf(x,y)\max_{(x,y) \in C} f(x,y), what computational challenge does this notation specifically indicate?

Finding the maximum value requires checking infinitely many points within the circular constraint region
The optimization must evaluate integer points only, requiring enumeration of feasible lattice points within bounds
The constraint set is non-convex, making standard linear programming techniques completely inapplicable to this problem
The objective function is unbounded above over the constraint set, making optimization impossible without modification
← Back to quizzes

Discrete Math Quiz

Discrete Math Quiz: Notation And Definitions

Practice Notation And Definitions in Discrete Math with focused quiz questions that help you check what you know, review explanations, and build confidence with test-style prompts.

What this quiz covers

This quiz focuses on Notation And Definitions, giving you a quick way to practice the rules, question types, and explanations that matter most for Discrete Math.

How to use this quiz

Try each quiz question before looking at the correct answer. Use the explanations to review missed ideas, then come back to similar questions until the pattern feels familiar.

All questions

Question 1

In a discrete optimization problem, a researcher defines the constraint set C={(x,y)Z2:x2+y225,x0,y0}C = \{(x,y) \in \mathbb{Z}^2 : x^2 + y^2 \leq 25, x \geq 0, y \geq 0\} and the objective function f(x,y)=3x+4yf(x,y) = 3x + 4y. When she writes max(x,y)Cf(x,y)\max_{(x,y) \in C} f(x,y), what computational challenge does this notation specifically indicate?

  1. Finding the maximum value requires checking infinitely many points within the circular constraint region
  2. The optimization must evaluate integer points only, requiring enumeration of feasible lattice points within bounds (correct answer)
  3. The constraint set is non-convex, making standard linear programming techniques completely inapplicable to this problem
  4. The objective function is unbounded above over the constraint set, making optimization impossible without modification
Explanation: The constraint set CC restricts (x,y)(x,y) to integer points (Z2\mathbb{Z}^2) in the first quadrant within a circle of radius 5. This creates a finite set of lattice points that must be enumerated: (0,0), (0,1), ..., (0,5), (1,0), ..., (4,3), (5,0), etc. This is an integer programming problem requiring discrete optimization. Choice A is wrong because there are only finitely many integer points in the bounded region. Choice C is wrong because the constraint set is convex (intersection of convex sets). Choice D is wrong because the bounded constraint set makes the linear objective function bounded.

Question 2

In a formal verification system, an engineer writes the temporal logic formula (pq)\square(p \rightarrow \diamond q) where pp represents "system receives input" and qq represents "system produces output." What system property does this formula specification require?

  1. The system must always produce output immediately whenever it receives input, with no delay permitted between events
  2. Whenever the system receives input, it must eventually produce output, though the timing of output is not constrained (correct answer)
  3. The system must continuously produce output as long as it is receiving input, maintaining synchronized input-output behavior
  4. The system must produce output infinitely often, and each output must be preceded by some input within finite time
Explanation: The formula (pq)\square(p \rightarrow \diamond q) means "always, if pp then eventually qq". The \square operator means "always" (globally), \rightarrow is implication, and \diamond means "eventually" (finally). So whenever the system receives input (pp), it must eventually produce output (qq), but there's no constraint on timing. Choice A incorrectly adds immediacy requirement. Choice C misinterprets the formula as requiring continuous output during input. Choice D reverses the causality and adds requirements not present in the formula.

Question 3

In complexity theory, a researcher defines L1mpL2L_1 \leq_m^p L_2 to denote polynomial-time many-one reducibility between languages L1L_1 and L2L_2. She then states: "If L1L_1 is NP\mathbf{NP}-complete and L1mpL2L_1 \leq_m^p L_2, then L2L_2 is NP\mathbf{NP}-hard." What does this logical statement require about L2L_2?

  1. Language L2L_2 must be in NP\mathbf{NP} and every language in NP\mathbf{NP} must reduce to L2L_2 in polynomial time
  2. Language L2L_2 must be computationally equivalent to L1L_1 under polynomial-time reductions in both directions
  3. Language L2L_2 must be at least as hard as any language in NP\mathbf{NP}, though L2L_2 itself need not be in NP\mathbf{NP} (correct answer)
  4. Language L2L_2 must be decidable in polynomial time if and only if P=NP\mathbf{P} = \mathbf{NP} holds true
Explanation: When you encounter complexity theory problems involving reductions and completeness, focus on the precise definitions: NP-complete means a language is both in NP and NP-hard, while NP-hard means every language in NP reduces to it in polynomial time. The key insight here is understanding what polynomial-time many-one reducibility preserves. Since L1L_1 is NP-complete, every language in NP reduces to L1L_1 (that's what NP-hard means). When we have L1mpL2L_1 \leq_m^p L_2, we can compose reductions: for any language LNPL \in \mathbf{NP}, we get LmpL1mpL2L \leq_m^p L_1 \leq_m^p L_2, which gives us LmpL2L \leq_m^p L_2 by transitivity. Therefore, every NP language reduces to L2L_2, making L2L_2 at least as hard as any NP problem—this is exactly the definition of NP-hard. Choice C captures this correctly. Choice A incorrectly requires L2NPL_2 \in \mathbf{NP}. Being NP-hard doesn't require membership in NPL2L_2 could be much harder, even undecidable. Choice B demands bidirectional reducibility, but we only know L1L_1 reduces to L2L_2, not vice versa. Choice D makes an unwarranted connection to the P=NP\mathbf{P} = \mathbf{NP} question that doesn't follow from the given information. Study tip: Remember that NP-hard is about being "at least as hard as NP" without requiring membership in NP itself. Many NP-hard problems are actually much harder than NP.

Question 4

A combinatorics researcher analyzes a generating function F(x)=n=0anxnF(x) = \sum_{n=0}^{\infty} a_n x^n where ana_n counts certain combinatorial objects of size nn. She discovers that F(x)=11xx2F(x) = \frac{1}{1-x-x^2} and wants to find a recurrence relation for the coefficients. Using the equation (1xx2)F(x)=1(1-x-x^2)F(x) = 1, what recurrence relation governs the sequence (an)n0(a_n)_{n \geq 0}?

  1. an=an1+an2a_n = a_{n-1} + a_{n-2} for n2n \geq 2, with appropriate initial conditions determined by the generating function (correct answer)
  2. an=an1+an2+1a_n = a_{n-1} + a_{n-2} + 1 for n2n \geq 2, with the constant term arising from the numerator
  3. an=nan1+n(n1)an2a_n = na_{n-1} + n(n-1)a_{n-2} for n2n \geq 2, incorporating the derivative structure of the generating function
  4. an=2an1an2a_n = 2a_{n-1} - a_{n-2} for n2n \geq 2, derived from the linear factors in the denominator polynomial
Explanation: From (1xx2)F(x)=1(1-x-x^2)F(x) = 1, expanding the left side gives (1xx2)n=0anxn=n=0anxnn=0anxn+1n=0anxn+2=1(1-x-x^2)\sum_{n=0}^{\infty} a_n x^n = \sum_{n=0}^{\infty} a_n x^n - \sum_{n=0}^{\infty} a_n x^{n+1} - \sum_{n=0}^{\infty} a_n x^{n+2} = 1. Collecting coefficients of xnx^n for n2n \geq 2: anan1an2=0a_n - a_{n-1} - a_{n-2} = 0, giving an=an1+an2a_n = a_{n-1} + a_{n-2}. Choice B incorrectly adds a constant term that doesn't appear in the coefficient equation. Choice C incorrectly involves derivatives. Choice D gets the wrong signs in the recurrence relation.

Question 5

A database designer uses the notation R(A,B,C)S(X,Y)R(A, B, C) \rightarrow S(X, Y) to indicate a relationship transformation where relation RR with attributes A,B,CA, B, C maps to relation SS with attributes X,YX, Y. If she defines πA,C(R)=T\pi_{A,C}(R) = T and then writes TA=XS=UT \bowtie_{A=X} S = U, what operation sequence does this represent in relational algebra?

  1. Project RR onto columns AA and CC, then perform natural join with SS on matching attribute names
  2. Project RR onto columns AA and CC, then perform theta join with SS where AA equals XX (correct answer)
  3. Select rows from RR where AA and CC meet criteria, then join with SS using equality condition
  4. Project RR onto columns AA and CC, then perform cartesian product with SS filtered by condition A=XA=X
Explanation: The notation πA,C(R)\pi_{A,C}(R) represents projection (selecting specific columns), creating relation TT with only columns AA and CC from RR. The notation A=X\bowtie_{A=X} represents a theta join with the specific condition that attribute AA from the left relation equals attribute XX from the right relation. Choice A is wrong because A=X\bowtie_{A=X} specifies a condition, not a natural join. Choice C confuses projection with selection. Choice D describes the implementation of join as filtered cartesian product, but the notation specifically indicates a theta join operation.

Question 6

In a distributed computing model, a researcher uses the notation CONFαCONF\text{CONF} \vdash_{\alpha} \text{CONF}' to represent state transitions, where CONF\text{CONF} and CONF\text{CONF}' are system configurations and α\alpha is an action. When she writes CONF0α1CONF1α2CONF2α3CONF3\text{CONF}_0 \vdash_{\alpha_1} \text{CONF}_1 \vdash_{\alpha_2} \text{CONF}_2 \vdash_{\alpha_3} \text{CONF}_3, what does this sequence notation formally specify?

  1. A deterministic execution path where each action uniquely determines the next configuration state from the current one
  2. A specification requiring that all three actions must be enabled simultaneously in the initial configuration for execution
  3. A parallel execution model where actions α1,α2,α3\alpha_1, \alpha_2, \alpha_3 can occur simultaneously across different system components
  4. A sequence of valid state transitions showing one possible execution trace through the system's state space (correct answer)
Explanation: When you encounter formal transition notation in discrete mathematics or computer science, you're looking at a way to describe how systems change state over time. The notation CONFαCONF\text{CONF} \vdash_{\alpha} \text{CONF}' is a standard way to express "configuration CONF can transition to configuration CONF' by performing action α." The sequence CONF0α1CONF1α2CONF2α3CONF3\text{CONF}_0 \vdash_{\alpha_1} \text{CONF}_1 \vdash_{\alpha_2} \text{CONF}_2 \vdash_{\alpha_3} \text{CONF}_3 shows a chain of transitions, representing one possible path the system could take through its state space. Each transition is valid (the \vdash symbol confirms this), but this is just one of potentially many possible execution traces from the initial state CONF0\text{CONF}_0. This makes D correct. A is wrong because the notation doesn't imply determinism—other actions might also be possible from each configuration. The sequence shows what happened, not what must happen. B misunderstands the temporal nature of the notation. The actions occur sequentially, not simultaneously, and only α1\alpha_1 needs to be enabled in CONF0\text{CONF}_0. C incorrectly suggests parallel execution. The chain notation explicitly shows sequential transitions where each action transforms one configuration into the next. Remember that formal transition systems describe all possible behaviors of a system. When you see a specific sequence like this, it's documenting one particular execution trace—a single path through the larger space of possible system behaviors. Focus on the sequential, one-step-at-a-time nature of these transition chains.

Question 7

In a formal logic system, the statement xZ+,yZ+:(xy)(y>x)\forall x \in \mathbb{Z}^+, \exists y \in \mathbb{Z}^+ : (x | y) \land (y > x) is being evaluated, where aba | b means "aa divides bb". A student claims this statement is true and provides the construction y=2xy = 2x as justification. What is the most precise assessment of this approach?

  1. The construction is correct and proves the statement is true for all positive integers
  2. The construction works for this statement, but the student should verify edge cases more carefully
  3. The construction is valid but insufficient since it only provides one example rather than universal proof
  4. The construction demonstrates the existential quantifier correctly and constitutes a complete proof of the statement (correct answer)
Explanation: The statement says for every positive integer xx, there exists a positive integer yy such that xx divides yy and y>xy > x. The construction y=2xy = 2x works for every positive integer xx: clearly x2xx | 2x and 2x>x2x > x for all xZ+x \in \mathbb{Z}^+. This single construction is sufficient to prove the existential statement for all xx. Choice A misses that this is about existence, not universality over yy. Choice B incorrectly suggests the proof is incomplete. Choice C misunderstands that one construction proving existence for all xx is sufficient for an existential statement.

Question 8

In formal language theory, a student defines an automaton M=(Q,Σ,δ,q0,F)M = (Q, \Sigma, \delta, q_0, F) and writes δ^(q0,w)F\hat{\delta}(q_0, w) \in F for a string wΣw \in \Sigma^*. She then claims that L(M)={wΣ:δ^(q0,w)F}L(M) = \{w \in \Sigma^* : \hat{\delta}(q_0, w) \in F\}. What does the extended transition function δ^\hat{\delta} compute that differs from the basic transition function δ\delta?

  1. Function δ^\hat{\delta} processes entire strings by composing individual symbol transitions, while δ\delta handles only single symbol transitions (correct answer)
  2. Function δ^\hat{\delta} determines acceptance by checking final state membership, while δ\delta only computes state-to-state movements
  3. Function δ^\hat{\delta} handles nondeterministic transitions by exploring multiple computation paths, while δ\delta is purely deterministic
  4. Function δ^\hat{\delta} incorporates ε-transitions for empty string processing, while δ\delta requires non-empty input symbols for all transitions
Explanation: The basic transition function δ:Q×ΣQ\delta: Q \times \Sigma \rightarrow Q defines transitions on single symbols, while the extended transition function δ^:Q×ΣQ\hat{\delta}: Q \times \Sigma^* \rightarrow Q processes entire strings by applying δ\delta repeatedly: δ^(q,wa)=δ(δ^(q,w),a)\hat{\delta}(q, wa) = \delta(\hat{\delta}(q,w), a) with δ^(q,ε)=q\hat{\delta}(q, \varepsilon) = q. Choice B incorrectly suggests δ^\hat{\delta} determines acceptance - it just computes the final state. Choice C incorrectly introduces nondeterminism not specified in the definition. Choice D incorrectly suggests ε-transitions, which aren't implied by the standard DFA definition given.

Question 9

A game theory student models a scenario using the notation G=(N,(Si)iN,(ui)iN)G = (N, (S_i)_{i \in N}, (u_i)_{i \in N}) where N={1,2,3}N = \{1, 2, 3\}, S1={A,B}S_1 = \{A, B\}, S2={X,Y}S_2 = \{X, Y\}, and S3={P,Q}S_3 = \{P, Q\}. When analyzing Nash equilibria, she writes s=(s1,s2,s3)S1×S2×S3s^* = (s_1^*, s_2^*, s_3^*) \in S_1 \times S_2 \times S_3. What constraint must ss^* satisfy to be a Nash equilibrium?

  1. For each player ii, strategy sis_i^* must maximize ui(s1,s2,s3)u_i(s_1^*, s_2^*, s_3^*) over all possible strategy profiles in the game
  2. The strategy profile ss^* must represent a Pareto optimal outcome maximizing the sum of all players' utilities simultaneously
  3. For each player ii, no unilateral deviation from sis_i^* can improve uiu_i given that other players maintain their strategies (correct answer)
  4. Each player ii must have equal expected utility under ss^*, ensuring fairness across all participants in the equilibrium
Explanation: When you encounter game theory notation like G=(N,(Si)iN,(ui)iN)G = (N, (S_i)_{i \in N}, (u_i)_{i \in N}), you're looking at a normal-form game with players NN, strategy sets SiS_i, and utility functions uiu_i. The key concept being tested is your understanding of Nash equilibrium's fundamental definition. A Nash equilibrium occurs when each player is making their best possible choice given what all other players are doing. This means no player can unilaterally change their strategy and improve their payoff. Answer C captures this perfectly: for each player ii, no unilateral deviation from sis_i^* can improve uiu_i given that other players maintain their strategies. This is the mathematical essence of Nash equilibrium. Answer A is incorrect because it suggests each player maximizes their utility over all possible strategy profiles in the entire game, which ignores the strategic interdependence that defines Nash equilibrium. Answer B confuses Nash equilibrium with Pareto optimality – these are completely different solution concepts, and Nash equilibria are often not Pareto optimal. Answer D incorrectly describes some notion of fairness or equal payoffs, but Nash equilibrium has nothing to do with equal utilities across players. Remember this key distinction: Nash equilibrium is about mutual best responses (no player wants to deviate unilaterally), while Pareto optimality is about collective efficiency. Many students confuse these concepts, so always focus on the "no profitable unilateral deviation" criterion when identifying Nash equilibria.

Question 10

A computer science student is modeling a social network where each person can be friends with at most 5 others, and friendship is always mutual. If the network has 20 people and exactly 35 friendships, which notation correctly expresses the constraint that person ii has at most 5 friends?

  1. j=120aij5\sum_{j=1}^{20} a_{ij} \leq 5 for all i{1,2,,20}i \in \{1,2,\ldots,20\} (correct answer)
  2. i=120aij5\sum_{i=1}^{20} a_{ij} \leq 5 for all j{1,2,,20}j \in \{1,2,\ldots,20\}
  3. deg(vi)5\deg(v_i) \leq 5 for all vertices viv_i in the friendship graph
  4. N(i)5|N(i)| \leq 5 for all iVi \in V where N(i)N(i) is the neighborhood of ii
Explanation: In an adjacency matrix representation, aij=1a_{ij} = 1 if persons ii and jj are friends, 0 otherwise. The sum j=120aij\sum_{j=1}^{20} a_{ij} counts all of person ii's friendships by summing across row ii. Choice A correctly expresses this constraint. Choice B sums down column jj, which would constrain how many people are friends with person jj. Choices C and D are mathematically correct but use graph theory notation rather than the discrete modeling notation typically expected in this context.

Question 11

A database designer models user permissions using a relation RU×PR \subseteq U \times P where UU is the set of users and PP is the set of permissions. The designer states: 'Every user must have at least the basic permission p0p_0, and no user can have permission p1p_1 without also having permission p2p_2.' Which logical expression correctly captures both constraints?

  1. uU:(u,p0)RuU:[(u,p1)R(u,p2)R]\forall u \in U: (u,p_0) \in R \land \forall u \in U: [(u,p_1) \in R \rightarrow (u,p_2) \in R] (correct answer)
  2. uU:(u,p0)RuU:[(u,p2)R(u,p1)R]\forall u \in U: (u,p_0) \in R \land \forall u \in U: [(u,p_2) \in R \rightarrow (u,p_1) \in R]
  3. uU:(u,p0)RuU:[(u,p1)R(u,p2)R]\exists u \in U: (u,p_0) \in R \land \forall u \in U: [(u,p_1) \in R \leftrightarrow (u,p_2) \in R]
  4. uU:(u,p0)R¬uU:[(u,p1)R(u,p2)R]\forall u \in U: (u,p_0) \in R \land \neg\exists u \in U: [(u,p_1) \in R \land (u,p_2) \notin R]
Explanation: The first constraint 'every user must have at least the basic permission p0p_0' translates to uU:(u,p0)R\forall u \in U: (u,p_0) \in R. The second constraint 'no user can have permission p1p_1 without also having permission p2p_2' means if a user has p1p_1, then they must have p2p_2, which is uU:[(u,p1)R(u,p2)R]\forall u \in U: [(u,p_1) \in R \rightarrow (u,p_2) \in R]. Choice B reverses the implication direction. Choice C uses existential quantification for the first constraint and bidirectional implication for the second. Choice D is equivalent to A but uses a more complex negated existential form.

Question 12

A cryptography application models message authentication using a hash function h:{0,1}{0,1}256h: \{0,1\}^* \to \{0,1\}^{256}. The system is said to be 'collision-resistant' if finding two different messages with the same hash is computationally infeasible. Given that the function processes approximately 2202^{20} messages daily, which statement correctly describes the collision resistance requirement in formal notation?

  1. m1,m2{0,1}:m1m2    h(m1)h(m2)\forall m_1, m_2 \in \{0,1\}^*: m_1 \neq m_2 \implies h(m_1) \neq h(m_2)
  2. The probability that m1m2\exists m_1 \neq m_2 such that h(m1)=h(m2)h(m_1) = h(m_2) is negligible for any polynomial-time adversary
  3. {(m1,m2):m1m2h(m1)=h(m2)}<220|\{(m_1,m_2) : m_1 \neq m_2 \land h(m_1) = h(m_2)\}| < 2^{20} for the daily message set
  4. For any polynomial-time algorithm AA, Pr[A()=(m1,m2):m1m2h(m1)=h(m2)]negl(λ)\Pr[A() = (m_1,m_2) : m_1 \neq m_2 \land h(m_1) = h(m_2)] \leq \text{negl}(\lambda) (correct answer)
Explanation: Collision resistance is a computational security property, not a mathematical impossibility. Since hh maps an infinite domain to a finite codomain, collisions must exist by the pigeonhole principle. Choice D correctly captures that no polynomial-time algorithm can find collisions with non-negligible probability, where λ\lambda is the security parameter. Choice A describes a collision-free function, which is impossible. Choice B is imprecise about the adversary model. Choice C focuses on a specific daily limit rather than the general computational hardness requirement.

Question 13

A bioinformatics researcher models DNA sequences as strings over the alphabet Σ={A,T,G,C}\Sigma = \{A, T, G, C\}. She defines a 'valid gene segment' as a substring that starts with 'ATG', ends with one of {TAA, TAG, TGA}, and has length divisible by 3. If LL represents the set of all valid gene segments, which formal definition correctly captures this language?

  1. L={ATGws:wΣ,s{TAA,TAG,TGA},ATGws0(mod3)}L = \{ATG \cdot w \cdot s : w \in \Sigma^*, s \in \{TAA, TAG, TGA\}, |ATG \cdot w \cdot s| \equiv 0 \pmod{3}\}
  2. L={ATGws:wΣ,s{TAA,TAG,TGA},w0(mod3)}L = \{ATG \cdot w \cdot s : w \in \Sigma^*, s \in \{TAA, TAG, TGA\}, |w| \equiv 0 \pmod{3}\}
  3. L={u:u=ATGws,w(Σ3),s{TAA,TAG,TGA}}L = \{u : u = ATG \cdot w \cdot s, w \in (\Sigma^3)^*, s \in \{TAA, TAG, TGA\}\} (correct answer)
  4. L={ATGws:wΣ+,s{TAA,TAG,TGA},ATGwsmod3=0}L = \{ATG \cdot w \cdot s : w \in \Sigma^+, s \in \{TAA, TAG, TGA\}, |ATG \cdot w \cdot s| \bmod 3 = 0\}
Explanation: A valid gene segment must have total length divisible by 3. Since ATG has length 3 and each stop codon (TAA, TAG, TGA) has length 3, the middle portion ww must also have length divisible by 3 to maintain the overall divisibility. Choice C correctly ensures this by requiring w(Σ3)w \in (\Sigma^3)^*, meaning ww is a concatenation of 3-character blocks. Choice A allows any ww and checks total length, but doesn't ensure proper codon structure. Choice B only checks w0(mod3)|w| \equiv 0 \pmod{3} but the total length constraint is implied, not explicit. Choice D is similar to A but uses Σ+\Sigma^+ requiring non-empty ww.

Question 14

An algorithm designer analyzes a recursive function T(n)T(n) that satisfies the recurrence T(n)=2T(n/2)+Θ(nlogn)T(n) = 2T(n/2) + \Theta(n \log n) for n>1n > 1 with T(1)=Θ(1)T(1) = \Theta(1). Using the Master Theorem, she needs to compare f(n)=Θ(nlogn)f(n) = \Theta(n \log n) with nlogban^{\log_b a}. Which comparison correctly determines the applicable case?

  1. f(n)=Θ(nlogn)=Θ(n1logn)f(n) = \Theta(n \log n) = \Theta(n^1 \log n), so f(n)=Θ(nlog22logn)f(n) = \Theta(n^{\log_2 2} \log n), applying Case 2 (correct answer)
  2. f(n)=Ω(nlogn)=Ω(n1+ϵ)f(n) = \Omega(n \log n) = \Omega(n^{1+\epsilon}) for ϵ=logn1>0\epsilon = \log n - 1 > 0, applying Case 3
  3. f(n)=O(nlogn)=O(n1ϵ)f(n) = O(n \log n) = O(n^{1-\epsilon}) for some ϵ>0\epsilon > 0, applying Case 1
  4. f(n)=Θ(nlogn)f(n) = \Theta(n \log n) and nlogba=n1n^{\log_b a} = n^1, but logn\log n is not polynomial, so Master Theorem doesn't apply
Explanation: In this recurrence, a=2a = 2, b=2b = 2, so nlogba=nlog22=n1=nn^{\log_b a} = n^{\log_2 2} = n^1 = n. We have f(n)=Θ(nlogn)f(n) = \Theta(n \log n). Since f(n)=Θ(nlogbalogn)=Θ(nlogn)f(n) = \Theta(n^{\log_b a} \log n) = \Theta(n \log n), this matches Case 2 of the Master Theorem exactly. Choice B incorrectly treats logn\log n as a polynomial factor. Choice C incorrectly suggests f(n)f(n) is polynomially smaller than nn. Choice D incorrectly claims the Master Theorem doesn't apply when it clearly does.

Question 15

A scheduling algorithm uses a priority queue implemented as a binary heap. Jobs arrive with priorities and the algorithm always processes the job with minimum priority value first. If the current heap contains jobs with priorities [2, 5, 3, 8, 7, 9, 4] arranged in a valid min-heap structure, what is the correct notation for the heap property that must be satisfied?

  1. For any node at index ii: priority[i]priority[2i]\text{priority}[i] \leq \text{priority}[2i] and priority[i]priority[2i+1]\text{priority}[i] \leq \text{priority}[2i+1]
  2. For any node at index ii: priority[i/2]priority[i]\text{priority}[\lfloor i/2 \rfloor] \leq \text{priority}[i] when i>1i > 1 (correct answer)
  3. For any parent node pp with children c1,c2c_1, c_2: priority[p]min(priority[c1],priority[c2])\text{priority}[p] \geq \min(\text{priority}[c_1], \text{priority}[c_2])
  4. For the root node rr: priority[r]=min{priority[i]:iheap}\text{priority}[r] = \min\{\text{priority}[i] : i \in \text{heap}\}
Explanation: In a min-heap with 1-based indexing, the heap property requires that every node's priority is less than or equal to its children's priorities. This is equivalently stated as: every node's priority is greater than or equal to its parent's priority. Choice B correctly expresses this using parent-child relationships where i/2\lfloor i/2 \rfloor gives the parent of node ii. Choice A states the property correctly but assumes children exist (doesn't handle boundary cases). Choice C incorrectly uses \geq instead of \leq. Choice D only describes a property of the root, not the general heap property.

Question 16

In a discrete probability model, events E1,E2,E3E_1, E_2, E_3 satisfy P(E1E2)=0.7P(E_1 \cup E_2) = 0.7, P(E2E3)=0.8P(E_2 \cup E_3) = 0.8, and P(E1E3)=0.6P(E_1 \cup E_3) = 0.6. If P(E1E2E3)=0.1P(E_1 \cap E_2 \cap E_3) = 0.1, which expression correctly represents P(E1E2E3)P(E_1 \cup E_2 \cup E_3) using the inclusion-exclusion principle?

  1. P(E1E2E3)=0.7+0.8+0.6P(E1E2)P(E2E3)P(E1E3)+0.1P(E_1 \cup E_2 \cup E_3) = 0.7 + 0.8 + 0.6 - P(E_1 \cap E_2) - P(E_2 \cap E_3) - P(E_1 \cap E_3) + 0.1
  2. P(E1E2E3)=P(E1)+P(E2)+P(E3)0.70.80.6+0.1P(E_1 \cup E_2 \cup E_3) = P(E_1) + P(E_2) + P(E_3) - 0.7 - 0.8 - 0.6 + 0.1
  3. P(E1E2E3)=1.1P(E1E2)P(E2E3)P(E1E3)+0.1P(E_1 \cup E_2 \cup E_3) = 1.1 - P(E_1 \cap E_2) - P(E_2 \cap E_3) - P(E_1 \cap E_3) + 0.1
  4. P(E1E2E3)=P(E1)+P(E2)+P(E3)P(E1E2)P(E2E3)P(E1E3)+0.1P(E_1 \cup E_2 \cup E_3) = P(E_1) + P(E_2) + P(E_3) - P(E_1 \cap E_2) - P(E_2 \cap E_3) - P(E_1 \cap E_3) + 0.1 (correct answer)
Explanation: The inclusion-exclusion principle states: P(E1E2E3)=P(E1)+P(E2)+P(E3)P(E1E2)P(E2E3)P(E1E3)+P(E1E2E3)P(E_1 \cup E_2 \cup E_3) = P(E_1) + P(E_2) + P(E_3) - P(E_1 \cap E_2) - P(E_2 \cap E_3) - P(E_1 \cap E_3) + P(E_1 \cap E_2 \cap E_3). Choice D correctly applies this formula. Choice A incorrectly substitutes union probabilities for individual event probabilities. Choice B has the wrong signs. Choice C attempts to use P(E1)+P(E2)+P(E3)=1.1P(E_1) + P(E_2) + P(E_3) = 1.1 but this sum could exceed 1 due to overlaps, making the approach invalid.

Question 17

A network security analyst models intrusion detection as a Markov chain with states S={Normal,Alert,Breach}S = \{\text{Normal}, \text{Alert}, \text{Breach}\}. The system transitions between states based on a transition matrix PP where PijP_{ij} represents the probability of moving from state ii to state jj in one time step. If the analyst wants to compute the probability of being in the Breach state after exactly 3 time steps starting from Normal, which notation correctly expresses this quantity?

  1. k=03PNormal,Breachk\sum_{k=0}^{3} P_{\text{Normal},\text{Breach}}^k representing the sum over all possible path lengths
  2. PNormal,Breach3P_{\text{Normal},\text{Breach}}^3 where the transition probability is raised to the third power
  3. (P3)Normal,Breach(P^3)_{\text{Normal},\text{Breach}} where P3P^3 is the matrix PP multiplied by itself 3 times (correct answer)
  4. 3PNormal,Breach3 \cdot P_{\text{Normal},\text{Breach}} since there are 3 time steps to accumulate probability
Explanation: When you encounter Markov chain problems asking about probabilities after multiple time steps, you're dealing with matrix powers and the Chapman-Kolmogorov equations. The key insight is that to find probabilities after n steps, you need the n-th power of the transition matrix. To find the probability of being in the Breach state after exactly 3 steps starting from Normal, you must account for all possible paths through the state space. This requires computing P3P^3 (the transition matrix multiplied by itself three times) and then selecting the entry (P3)Normal,Breach(P^3)_{\text{Normal},\text{Breach}}. Each matrix multiplication incorporates one additional time step, properly weighting all intermediate paths. Option A incorrectly sums probabilities across different path lengths from 0 to 3 steps, which would give you the probability of ever reaching Breach within 3 steps, not the probability of being there at exactly step 3. Option B misunderstands matrix notation—you can't raise a single matrix entry to a power and expect meaningful results about multi-step transitions. Option D simply multiplies the one-step probability by 3, which ignores the complex path dependencies inherent in Markov chains and would often exceed 1 (impossible for a probability). The correct answer is C: (P3)Normal,Breach(P^3)_{\text{Normal},\text{Breach}} properly captures the 3-step transition probability. Study tip: Remember that for n-step transition probabilities in Markov chains, always think "matrix to the nth power, then extract the relevant entry." The matrix power handles all the path complexity automatically.

Question 18

A logistics company models package routing using a directed graph where edge weights represent travel times in hours. The company defines d(u,v)d(u,v) as the shortest path distance from vertex uu to vertex vv. If d(A,C)=7d(A,C) = 7, d(A,B)=3d(A,B) = 3, and d(B,C)=5d(B,C) = 5, which statement about the graph structure is necessarily true?

  1. There exists a direct edge from AA to CC with weight greater than 7
  2. The shortest path from AA to CC does not pass through vertex BB (correct answer)
  3. The graph contains at least one cycle involving vertices AA, BB, or CC
  4. Vertex BB lies on some shortest path from AA to CC, but not necessarily the unique one
Explanation: Since d(A,B)+d(B,C)=3+5=8>7=d(A,C)d(A,B) + d(B,C) = 3 + 5 = 8 > 7 = d(A,C), the path ABCA \to B \to C is longer than the shortest path from AA to CC. Therefore, the shortest path from AA to CC cannot pass through BB. Choice A is incorrect because there might be no direct edge, or it could have weight exactly 7. Choice C is incorrect as the given distances don't imply any cycles. Choice D contradicts our analysis since BB cannot be on any shortest AA-to-CC path.