Discrete Structure – 300 MCQs with Answers (Complete Exam Prep Guide)

DS-201 Discrete Structure – 300 MCQs

Discrete Structure – 300 MCQs

Course-Aligned Multiple Choice Questions for Exam Preparation

Logic, Sets, Relations, Counting, Algorithms, Graphs and Trees

300 MCQs7 Sections3 (3-0) Credit HoursSearchable
300
Total MCQs
7
Sections
DS
Course
3 (3-0)
Credit Hours
SECTION 1: Mathematical Reasoning, Logic and Proofs (Q1-Q50)
Q1

A proposition is a statement that:

  • AHas a definite truth value
  • BIs always a question
  • CIs always false
  • DContains variables only
Q2

Which of the following is a proposition?

  • AOpen the door
  • Bx + 2 = 5
  • C2 + 3 = 5
  • DHow are you?
Q3

The truth value of a tautology is:

  • AAlways true
  • BAlways false
  • CSometimes true
  • DUndefined
Q4

A contradiction is a statement that is:

  • AAlways true
  • BAlways false
  • CEquivalent to implication
  • DA valid argument
Q5

The negation of proposition p is written as:

  • Ap and q
  • Bnot p
  • Cp implies q
  • Dp iff q
Q6

The conjunction p ∧ q is true when:

  • AAt least one is true
  • BBoth are true
  • CBoth are false
  • DOnly p is true
Q7

The disjunction p ∨ q is false when:

  • ABoth are true
  • BAt least one is true
  • CBoth are false
  • DOnly q is true
Q8

The exclusive OR of p and q is true when:

  • ABoth are true
  • BExactly one is true
  • CBoth are false
  • Dp implies q
Q9

The implication p → q is false when:

  • Ap is true and q is false
  • Bp is false and q is true
  • CBoth are true
  • DBoth are false
Q10

The biconditional p ↔ q is true when:

  • AExactly one is true
  • Bp is true only
  • CBoth have the same truth value
  • Dq is false only
Q11

Which connective means 'and'?

  • A
  • B¬
  • C
  • D
Q12

Which connective means 'or'?

  • A
  • B
  • C¬
  • D
Q13

Which connective means 'if…then'?

  • A
  • B
  • C¬
  • D
Q14

Which connective means 'if and only if'?

  • A
  • B
  • C
  • D
Q15

The negation of p ∨ q is equivalent to:

  • A¬p ∨ ¬q
  • B¬p ∧ ¬q
  • Cp ∧ q
  • Dp → q
Q16

The negation of p ∧ q is equivalent to:

  • A¬p ∧ ¬q
  • B¬p ∨ ¬q
  • Cp ∨ q
  • Dp ↔ q
Q17

De Morgan's laws are mainly used to:

  • ACount permutations
  • BNegate compound statements
  • CSort arrays
  • DDefine graphs
Q18

A truth table is used to:

  • AStore data permanently
  • BShow all possible truth values of a compound statement
  • CCompute factorials
  • DProve graphs are planar
Q19

Two propositions are logically equivalent if:

  • AThey use the same symbols
  • BThey have the same truth table
  • CBoth are false
  • DBoth contain variables
Q20

The statement p ∨ ¬p is an example of:

  • AContradiction
  • BTautology
  • CContingency
  • DNegation
Q21

The statement p ∧ ¬p is an example of:

  • ATautology
  • BContradiction
  • CBiconditional
  • DInference rule
Q22

A contingency is a proposition that is:

  • AAlways true
  • BAlways false
  • CSometimes true and sometimes false
  • DEquivalent to a tautology
Q23

In logic, precedence is usually highest for:

  • A
  • B
  • C¬
  • D
Q24

The converse of p → q is:

  • A¬p → ¬q
  • Bq → p
  • C¬q → ¬p
  • Dp ↔ q
Q25

The contrapositive of p → q is:

  • Aq → p
  • B¬p → ¬q
  • C¬q → ¬p
  • Dp ∧ q
Q26

The inverse of p → q is:

  • A¬p → ¬q
  • Bq → p
  • C¬q → ¬p
  • Dp ↔ q
Q27

An argument is valid if:

  • AIts conclusion is always true
  • BWhenever premises are true, the conclusion is true
  • CAll premises are false
  • DIt has at least two premises
Q28

Which is a standard rule of inference?

  • AModus Ponens
  • BCommutative Error
  • CMatrix Rule
  • DBubble Rule
Q29

From p and p → q, we infer q by:

  • AModus Tollens
  • BDisjunctive Syllogism
  • CModus Ponens
  • DResolution only
Q30

From ¬q and p → q, we infer ¬p by:

  • AModus Ponens
  • BModus Tollens
  • CSimplification
  • DAddition
Q31

From p ∨ q and ¬p, we infer q by:

  • AResolution
  • BDisjunctive Syllogism
  • CHypothetical Syllogism
  • DConjunction
Q32

From p and q, we can infer:

  • Ap ∨ q only
  • Bp ∧ q
  • C¬p
  • Dp → q
Q33

From p ∧ q, we can infer:

  • Ap
  • Bp → q
  • C¬q
  • Dp ↔ q
Q34

The law p ∧ q ≡ q ∧ p is called:

  • AAssociative law
  • BDistributive law
  • CCommutative law
  • DIdentity law
Q35

The law p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) is:

  • AAssociative law
  • BDistributive law
  • CDomination law
  • DNegation law
Q36

Predicate logic extends propositional logic by introducing:

  • ATruth tables only
  • BVariables and quantifiers
  • CGraphs and trees
  • DSorting techniques
Q37

The universal quantifier is written as:

  • A
  • B
  • C
  • D¬
Q38

The existential quantifier is written as:

  • A
  • B
  • C
  • D
Q39

The statement ∀x P(x) means:

  • AThere exists an x such that P(x)
  • BFor every x, P(x) holds
  • CNo x satisfies P(x)
  • DExactly one x satisfies P(x)
Q40

The statement ∃x P(x) means:

  • AP(x) is false for all x
  • BExactly one x satisfies P(x)
  • CThere exists at least one x such that P(x)
  • DFor all x, P(x) holds
Q41

The negation of ∀x P(x) is:

  • A∀x ¬P(x)
  • B∃x ¬P(x)
  • C∃x P(x)
  • D¬P(x)
Q42

The negation of ∃x P(x) is:

  • A∃x ¬P(x)
  • B¬P(x)
  • C∀x ¬P(x)
  • D∀x P(x)
Q43

A predicate becomes a proposition when:

  • AIt is written with a variable
  • BA variable is assigned a value or quantified
  • CIt contains a set
  • DIt uses implication
Q44

In computing, predicate logic is useful for:

  • ADescribing program properties
  • BPainting graphics only
  • CMeasuring voltage
  • DNetwork cabling
Q45

Which proof style starts by assuming the negation of the conclusion?

  • ADirect proof
  • BProof by contradiction
  • CMathematical induction
  • DCase analysis
Q46

Which proof method shows p → q by proving ¬q → ¬p?

  • AContradiction
  • BContraposition
  • CInduction
  • DTrivial proof
Q47

A direct proof of p → q begins by assuming:

  • A¬q
  • Bq
  • Cp
  • D¬p
Q48

Mathematical induction is commonly used to prove statements about:

  • AReal numbers only
  • BNatural numbers
  • CGraphs only
  • DMatrices only
Q49

The first step in induction is called:

  • AInductive conclusion
  • BBase case
  • CHypothesis test
  • DRecurrence step
Q50

The assumption that P(k) is true in induction is called:

  • AInverse
  • BInductive hypothesis
  • CCounterexample
  • DPartition
SECTION 2: Set Theory, Functions and Mappings (Q51-Q100)
Q51

The goal in the inductive step is usually to show:

  • AP(0) implies P(1)
  • BP(k) implies P(k+1)
  • C¬P(k)
  • DP(k+2)
Q52

A set is a:

  • ACollection of distinct objects
  • BSequence of repeated values
  • CSorted list only
  • DTruth table column
Q53

The symbol ∈ means:

  • AIs a subset of
  • BIs an element of
  • CIs equal to
  • DIs disjoint from
Q54

The empty set is denoted by:

  • A{}
  • B[]
  • C()
  • D<>
Q55

The cardinality of a set is its:

  • AOrder of listing
  • BNumber of elements
  • CLargest element
  • DSubset count only
Q56

If every element of A is also in B, then A is:

  • ADisjoint from B
  • BA subset of B
  • CEqual to B necessarily
  • DA complement of B
Q57

A proper subset means:

  • AA ⊆ B and A ≠ B
  • BA = B
  • CA ∩ B = ∅
  • DA contains B
Q58

The union A ∪ B contains elements that are:

  • AIn both A and B only
  • BIn A or B or both
  • CIn A only
  • DIn B only
Q59

The intersection A ∩ B contains elements that are:

  • AIn A only
  • BIn B only
  • CIn both A and B
  • DIn neither set
Q60

Two sets are disjoint if:

  • AThey are equal
  • BTheir intersection is empty
  • CTheir union is empty
  • DThey have same cardinality
Q61

The complement of A contains elements:

  • AOnly in A
  • BNot in A relative to the universal set
  • CIn A ∩ B
  • DIn the empty set only
Q62

The set difference A – B contains elements:

  • AIn B but not A
  • BIn A but not B
  • CIn both
  • DIn neither
Q63

The power set of A is the set of:

  • AAll elements of A
  • BAll proper subsets of A
  • CAll subsets of A
  • DAll supersets of A
Q64

If a set has n elements, its power set has:

  • An elements
  • B2n elements
  • Cn^2 elements
  • D2^n elements
Q65

Venn diagrams are useful for:

  • AShowing set relationships
  • BRunning recursion
  • CSorting numbers
  • DBuilding trees
Q66

Ordered pairs are important in defining:

  • AUnions only
  • BRelations
  • CNegations
  • DTruth tables
Q67

A Cartesian product A × B consists of:

  • AAll subsets of A and B
  • BAll ordered pairs (a,b) with a in A and b in B
  • CAll common elements
  • DAll functions from A to B only
Q68

A function from A to B assigns:

  • AMultiple outputs to each input
  • BExactly one output in B to each input in A
  • CAt least two inputs to one output
  • DOnly distinct outputs
Q69

The set A in f: A → B is called the:

  • ACodomain
  • BRange
  • CDomain
  • DImage
Q70

The set B in f: A → B is called the:

  • ACodomain
  • BDomain
  • CInverse
  • DKernel
Q71

The actual outputs of a function form the:

  • ACodomain
  • BRange
  • CDomain
  • DCartesian product
Q72

A function is one-to-one if:

  • AEvery codomain element is used
  • BDistinct inputs have distinct outputs
  • CIt has finite domain only
  • DIt is recursive
Q73

A function is onto if:

  • AEvery codomain element has a preimage
  • BIt is one-to-one
  • CIt maps to itself only
  • DIts domain is finite
Q74

A bijection is a function that is:

  • ANeither one-to-one nor onto
  • BOnly onto
  • CBoth one-to-one and onto
  • DRecursive only
Q75

An inverse function exists only if the function is:

  • AConstant
  • BBijective
  • COnto only
  • DMany-to-one
Q76

The composition (g ∘ f)(x) means:

  • Ag(x) + f(x)
  • Bg(f(x))
  • Cf(g(x)) always
  • Dg(x)f(x)
Q77

The identity function on set A maps each element to:

  • A0
  • B1
  • CItself
  • DIts inverse
Q78

A recursive function is defined using:

  • AOnly loops
  • BItself in its definition
  • CMatrices only
  • DTruth tables
Q79

In computer science, recursion usually requires:

  • AA base case
  • BA power set
  • CA planar graph
  • DA partition
Q80

A sequence is:

  • AAn unordered set
  • BAn ordered list of elements
  • CA graph with vertices
  • DA relation only
Q81

An arithmetic sequence has:

  • AA common ratio
  • BA common difference
  • CRandom terms
  • DOnly prime numbers
Q82

A geometric sequence has:

  • AA common difference
  • BA common ratio
  • CNo pattern
  • DA recurrence only
Q83

A mapping is another term commonly used for:

  • ATruth table
  • BFunction
  • CTautology
  • DPartition
Q84

If f(a)=f(b) implies a=b, then f is:

  • AOnto
  • BInjective
  • CConstant
  • DUndefined
Q85

If for each y in B there exists x in A with f(x)=y, then f is:

  • AInjective
  • BOnto
  • CIdentity
  • DRecursive
Q86

The floor of 3.9 is:

  • A4
  • B3
  • C0
  • D-4
Q87

The ceiling of 3.1 is:

  • A3
  • B4
  • C2
  • D5
Q88

A partition of a set divides it into:

  • APossibly overlapping subsets
  • BNonempty disjoint subsets whose union is the set
  • COnly two subsets
  • DOrdered pairs
Q89

Russell's set paradox motivated careful treatment of:

  • ARecursion
  • BSet theory
  • CGraph coloring
  • DSearching
Q90

Finite sets are especially important in CS because many structures are:

  • AContinuous
  • BDiscrete and countable
  • CUnbounded physically
  • DAlways geometric
Q91

Characteristic functions represent sets using:

  • AMatrices
  • B0 and 1 values
  • CTrees only
  • DPrime factors
Q92

The symmetric difference A △ B contains elements:

  • AIn both sets
  • BIn exactly one of the sets
  • COnly in the universal set
  • DOnly in A
Q93

The cardinality formula for two sets is |A ∪ B| =

  • A|A| + |B|
  • B|A| + |B| – |A ∩ B|
  • C|A ∩ B|
  • D|A| – |B|
Q94

A countably infinite set has:

  • ANo elements
  • BElements that can be matched with natural numbers
  • CMore elements than real numbers
  • DOnly finite subsets
Q95

Which of the following is countably infinite?

  • AReal numbers
  • BIntegers
  • CPoints on a line segment
  • DAll subsets of reals
Q96

A function from a finite set A to itself that is one-to-one must also be:

  • AUndefined
  • BOnto
  • CConstant
  • DRecursive
Q97

The image of subset S under function f is:

  • A{f(x) : x in S}
  • BAll x in domain
  • CThe inverse of S
  • DThe complement of S
Q98

Preimage of T under f is:

  • A{x : f(x) in T}
  • BAll outputs only
  • COnly inverse values
  • DT itself
Q99

Many database queries rely heavily on:

  • ASet operations
  • BOnly graph coloring
  • COnly induction
  • DOnly recurrence
Q100

A relation from A to B is any subset of:

  • AA ∪ B
  • BA × B
  • CP(A)
  • DP(B)
SECTION 3: Relations, Partial Orders and Recurrence Relations (Q101-Q150)
Q101

Binary relations are represented naturally by:

  • AAdjacency matrices
  • BOnly line graphs
  • COnly sequences
  • DOnly arrays of size one
Q102

A relation on set A is reflexive if:

  • A(a,a) is in R for every a in A
  • B(a,b) implies (b,a) only
  • C(a,b) and (b,c) imply (a,c)
  • DNo element relates to itself
Q103

A relation is symmetric if:

  • A(a,b) implies (b,a)
  • B(a,a) is in R
  • C(a,b) and (b,c) imply (a,c)
  • DaRb implies a=b
Q104

A relation is antisymmetric if:

  • A(a,b) and (b,a) imply a=b
  • B(a,b) implies (b,a)
  • CEvery pair is related
  • DNo pair is related
Q105

A relation is transitive if:

  • A(a,b) implies (b,a)
  • B(a,b) and (b,c) imply (a,c)
  • C(a,a) holds
  • D(a,b) implies a=b
Q106

An equivalence relation must be:

  • AReflexive, symmetric, and transitive
  • BReflexive, antisymmetric, and transitive
  • CSymmetric only
  • DTransitive only
Q107

A partial order must be:

  • AReflexive, symmetric, and transitive
  • BReflexive, antisymmetric, and transitive
  • COnly antisymmetric
  • DComplete and symmetric
Q108

Equivalence relations partition a set into:

  • AChains
  • BClasses
  • CTrees
  • DFunctions
Q109

The equivalence class of a under relation R is:

  • AAll elements related to a
  • BAll subsets containing a
  • COnly a itself
  • DAll elements not related to a
Q110

Congruence modulo n is an example of:

  • APartial order
  • BEquivalence relation
  • CFunction composition
  • DHamiltonian path
Q111

The divisibility relation on positive integers is a:

  • APartial order
  • BEquivalence relation
  • CSymmetric relation
  • DBijection
Q112

A poset stands for:

  • APartially ordered set
  • BPositive ordered sequence
  • CPropositional set
  • DPartitioned ordered tuple
Q113

In a Hasse diagram, edges usually show:

  • AAll reflexive pairs
  • BCovering relations
  • COnly symmetric pairs
  • DFunction composition
Q114

A maximal element in a poset is one that:

  • AIs greater than every element
  • BHas no strictly larger comparable element in the set
  • CIs the smallest element
  • DAppears first in listing
Q115

A greatest element in a poset is one that:

  • ANeed not be unique
  • BIs greater than or equal to every element
  • CHas no outgoing edges
  • DNeed not exist and is always maximal only
Q116

A minimal element in a poset is one that:

  • AHas no strictly smaller comparable element in the set
  • BIs less than every element
  • CIs reflexive only
  • DIs equivalent to least element
Q117

A least element in a poset is one that:

  • AIs below every element
  • BHas no smaller element only
  • CMust be multiple
  • DNeed not be unique
Q118

A lattice is a poset in which every pair has:

  • AAn equivalence class
  • BA least upper bound and greatest lower bound
  • CA Hamiltonian cycle
  • DA bijection
Q119

The least upper bound is also called:

  • AMeet
  • BJoin
  • CInverse
  • DClosure
Q120

The greatest lower bound is also called:

  • AJoin
  • BMeet
  • CRange
  • DImage
Q121

A total order is a partial order where:

  • AEvery pair is comparable
  • BNo pair is comparable
  • CIt is symmetric
  • DIt has no maximal element
Q122

Recurrence relations define terms using:

  • AOnly graphs
  • BPrevious terms
  • CTruth tables only
  • DSet complements
Q123

The Fibonacci sequence satisfies:

  • AFn = Fn-1 + Fn-2
  • BFn = 2Fn-1
  • CFn = n!
  • DFn = n^2
Q124

To solve a recurrence uniquely, we usually need:

  • AA graph
  • BInitial conditions
  • CA partition
  • DA contradiction
Q125

The recurrence an = an-1 + d defines a:

  • AGeometric sequence
  • BArithmetic progression
  • CQuadratic sequence only
  • DPermutation
Q126

The recurrence an = r an-1 defines a:

  • AArithmetic progression
  • BGeometric progression
  • CConstant sequence only
  • DSet partition
Q127

A closed form gives:

  • AA recursive definition
  • BA formula without referring to previous terms
  • COnly the first term
  • DA truth table
Q128

Strong induction differs from ordinary induction because it assumes:

  • AOnly P(1)
  • BP(1) through P(k)
  • COnly P(k+1)
  • DNo hypothesis
Q129

Well-ordering principle states that every nonempty set of natural numbers has:

  • AA largest element
  • BA least element
  • CExactly two elements
  • DA complement
Q130

Proof by cases is useful when:

  • AA statement naturally splits into separate possibilities
  • BThere is no hypothesis
  • COnly for planar graphs
  • DOnly for recursion
Q131

Counterexamples are used to show a statement is:

  • ATrue
  • BFalse
  • CEquivalent
  • DRecursive
Q132

In software verification, invariants are properties that remain:

  • ARandom
  • BUnchanged during execution steps
  • CFalse initially
  • DOnly numeric
Q133

Loop invariants are often proved using:

  • AInductive reasoning
  • BGraph coloring
  • CContradiction only
  • DPigeonhole principle only
Q134

The transitive closure of relation R adds pairs needed to make R:

  • AReflexive
  • BTransitive
  • CSymmetric
  • DAntisymmetric
Q135

The reflexive closure of relation R adds:

  • AAll missing (a,a) pairs
  • BAll symmetric pairs
  • CAll transitive pairs
  • DAll equivalence classes
Q136

A relation matrix uses rows and columns to indicate:

  • AMembership of ordered pairs
  • BOnly set sizes
  • COnly function values
  • DOnly graph colors
Q137

Warshall's algorithm computes:

  • AShortest path lengths
  • BTransitive closure
  • CMinimum spanning tree
  • DSorting order
Q138

An equivalence relation on a database domain can help identify:

  • AGroups of indistinguishable items under a criterion
  • BOnly file sizes
  • COnly indexes
  • DOnly trees
Q139

If a relation is reflexive and symmetric but not transitive, it is:

  • ANot an equivalence relation
  • BA partial order
  • CA total order
  • DA bijection
Q140

In partial orders, incomparable elements are those for which:

  • ANeither a≤b nor b≤a holds
  • BBoth a≤b and b≤a hold
  • CThey are equal
  • DThey are in different sets
Q141

A chain in a poset is a subset where:

  • ANo two elements are comparable
  • BEvery two elements are comparable
  • CAll elements are maximal
  • DAll elements are minimal
Q142

An antichain in a poset is a subset where:

  • AEvery pair is comparable
  • BNo two distinct elements are comparable
  • CEvery element is least
  • DThe set is empty only
Q143

Recursive definitions are useful in CS for defining:

  • AData structures and algorithms
  • BOnly arithmetic
  • COnly geometry
  • DOnly chemistry
Q144

An algorithm described recursively often has an implementation using:

  • AFunctions calling themselves
  • BOnly goto
  • COnly iteration and never recursion
  • DGraphs only
Q145

Mastering proofs helps in discrete structures because it supports:

  • ACorrect reasoning about algorithms
  • BFaster internet
  • CHigher screen resolution
  • DAudio compression
Q146

The sum 1 + 2 + … + n is often proved by:

  • APigeonhole principle
  • BMathematical induction
  • CGraph coloring
  • DEuler circuit
Q147

A recurrence of the form an = c for all n defines a:

  • AConstant sequence
  • BGeometric progression
  • CPermutation
  • DFunction inverse
Q148

The degree of rigor required in discrete math proofs is important for:

  • AReliable software reasoning
  • BDecorative diagrams only
  • CFaster typing
  • DRandom testing only
Q149

The relation 'is ancestor of' on people is typically:

  • ASymmetric
  • BTransitive
  • CReflexive
  • DAn equivalence relation
Q150

The relation '=' on any set is:

  • AOnly symmetric
  • BAn equivalence relation and a partial order
  • CNot transitive
  • DNot reflexive
SECTION 4: Number Theory, Sequences, Counting and Probability (Q151-Q210)
Q151

A recursive algorithm must avoid infinite recursion by having:

  • AA least element
  • BA base case
  • CA partition
  • DA Hasse diagram
Q152

A prime number is an integer greater than 1 with:

  • AExactly two positive divisors
  • BExactly one divisor
  • COnly odd factors
  • DNo divisors
Q153

An integer a divides b if:

  • Ab/a is irrational
  • Bb = ak for some integer k
  • Ca > b always
  • Da+b is prime
Q154

The greatest common divisor of 12 and 18 is:

  • A2
  • B3
  • C6
  • D9
Q155

The least common multiple of 4 and 6 is:

  • A12
  • B10
  • C24
  • D8
Q156

Euclidean algorithm is used to find:

  • APrime factors only
  • BGreatest common divisor
  • CLeast upper bound
  • DShortest path
Q157

If gcd(a,b)=1, then a and b are called:

  • AComposite
  • BCoprime
  • CEquivalent
  • DTransitive
Q158

Fundamental theorem of arithmetic states that every integer greater than 1 can be written as:

  • AA unique product of primes up to order
  • BA sum of primes only
  • CA power of 2
  • DA recurrence
Q159

A number is even if it is divisible by:

  • A3
  • B5
  • C2
  • D10 only
Q160

A number is odd if it can be written as:

  • A2k
  • B2k+1
  • Ck/2
  • Dk^2
Q161

If a divides b and b divides c, then:

  • Aa divides c
  • Bc divides a
  • Ca=b always
  • DNo conclusion
Q162

Modular arithmetic deals with remainders after division by:

  • AA modulus
  • BA graph
  • CA sequence
  • DA predicate
Q163

17 mod 5 equals:

  • A1
  • B2
  • C3
  • D4
Q164

Two integers a and b are congruent modulo n if:

  • Aa=b
  • Bn divides a-b
  • Ca+b=n
  • Da and b are prime
Q165

The notation a ≡ b (mod n) means:

  • Aa and b have the same remainder when divided by n
  • Ba<b always
  • Ca divides b
  • Da+b is a multiple of n
Q166

In cryptography, modular arithmetic is important because:

  • AIt supports finite computations and encryption methods
  • BIt removes the need for keys
  • CIt avoids numbers
  • DIt proves only geometry theorems
Q167

A sequence defined by an = n^2 is:

  • AArithmetic
  • BQuadratic
  • CGeometric
  • DConstant
Q168

The sum of first n terms of an arithmetic sequence depends on:

  • AFirst term, last term, and n
  • BOnly common ratio
  • COnly graph size
  • DOnly parity
Q169

The sum of a geometric series with ratio r (|r|<1 in infinite case) depends on:

  • ACommon ratio
  • BOnly first difference
  • COnly gcd
  • DOnly domain
Q170

Factorial of n, written n!, equals:

  • An+n-1
  • Bn(n-1)(n-2)…1
  • C2n
  • Dn^2
Q171

0! is defined as:

  • A0
  • B1
  • CUndefined
  • D2
Q172

The number of ways to arrange n distinct objects is:

  • An
  • Bn!
  • C2^n
  • Dn^2
Q173

A permutation considers:

  • AOrder matters
  • BOrder does not matter
  • COnly repetition
  • DOnly subsets
Q174

A combination considers:

  • AOrder matters
  • BOrder does not matter
  • COnly sequences
  • DOnly permutations with repetition
Q175

The number of r-combinations from n objects is:

  • AnPr
  • BnCr
  • Cr^n
  • Dn!
Q176

The number of r-permutations from n distinct objects is:

  • AnCr
  • BnPr
  • C2^n
  • Dr!
Q177

The binomial coefficient nCr counts:

  • APermutations of n objects
  • BWays to choose r objects from n without order
  • CPrime factors
  • DEdges in a graph
Q178

Pascal's identity relates binomial coefficients as:

  • AnCr = nPr
  • BnCr = (n-1)C(r-1) + (n-1)Cr
  • CnCr = r!
  • DnCr = 2^n
Q179

The binomial theorem expands:

  • A(a+b)^n
  • Ba^n+b^n only
  • Cn!
  • Da-b only
Q180

The inclusion-exclusion principle is used to:

  • ACount union sizes while correcting overlap
  • BSort data
  • CBuild trees
  • DFind inverses only
Q181

For two sets, |A ∪ B| equals:

  • A|A| + |B| – |A ∩ B|
  • B|A| – |B|
  • C|A ∩ B|
  • D|A| + |B|
Q182

The pigeonhole principle states that if more than n objects are placed into n boxes, then:

  • AEvery box has one object
  • BAt least one box has at least two objects
  • CAll boxes are full equally
  • DNo box is empty
Q183

A common application of pigeonhole principle is proving:

  • ASome repetition must occur
  • BEvery graph is planar
  • CEvery function has an inverse
  • DAll primes are odd
Q184

If 13 people are in a room, at least two were born in the same:

  • AHour
  • BMonth
  • CCity
  • DYear
Q185

The number of binary strings of length n is:

  • An
  • B2n
  • C2^n
  • Dn!
Q186

A probability value always lies between:

  • A-1 and 1
  • B0 and 1
  • C1 and 2
  • DAny integers
Q187

If all outcomes are equally likely, probability of event E is:

  • A|E|/|S|
  • B|S|/|E|
  • Cn!
  • D2^n
Q188

The probability of the complement of event E is:

  • AP(E)
  • B1 – P(E)
  • C1 + P(E)
  • D0
Q189

If events A and B are mutually exclusive, then P(A ∪ B) =

  • AP(A)+P(B)
  • BP(A)P(B)
  • CP(A)-P(B)
  • D0
Q190

If events A and B are independent, then:

  • AP(A∩B)=P(A)+P(B)
  • BP(A∩B)=P(A)P(B)
  • CP(A|B)=0
  • DA and B are disjoint
Q191

Conditional probability P(A|B) means:

  • AProbability of B given A only
  • BProbability of A given B
  • CA and B are independent
  • DA or B occurs
Q192

Bayes' theorem is useful for:

  • AUpdating probabilities with new evidence
  • BSorting lists
  • CProving induction
  • DDrawing Hasse diagrams
Q193

Expected value in probability is:

  • AThe weighted average outcome
  • BAlways the most likely outcome
  • CAlways an integer
  • DThe complement of variance
Q194

A random variable in discrete math usually maps outcomes to:

  • ASets
  • BNumerical values
  • CTrees
  • DPredicates only
Q195

The number of subsets of an n-element set is:

  • An!
  • B2^n
  • Cn^2
  • Dn
Q196

How many 3-letter strings can be formed from 26 letters if repetition is allowed?

  • A26^3
  • B26P3
  • C26C3
  • D3^26
Q197

How many ways can 5 distinct books be arranged on a shelf?

  • A5
  • B25
  • C120
  • D32
Q198

How many ways can 2 objects be chosen from 5 distinct objects?

  • A10
  • B20
  • C5
  • D25
Q199

The handshake problem with n people where everyone shakes hands once gives:

  • An!
  • Bn(n-1)/2
  • C2^n
  • Dn^2
Q200

Parity arguments are based on whether integers are:

  • APrime or composite
  • BEven or odd
  • CPositive or negative
  • DRational or irrational
Q201

An absurd result such as an integer being both even and odd often indicates:

  • AA contradiction
  • BA tautology
  • CA bijection
  • DA partition
Q202

The sum of first n positive odd numbers is:

  • An^2
  • B2n
  • Cn!
  • D2^n
Q203

The number of functions from an n-element set to a k-element set is:

  • An+k
  • Bk^n
  • Cn^k
  • Dn!
Q204

The number of one-to-one functions from an r-element set to an n-element set (r≤n) is:

  • AnCr
  • BnPr
  • Cr^n
  • D2^n
Q205

Combinatorial reasoning is important in CS for analyzing:

  • APossible configurations and algorithm cases
  • BOnly colors
  • COnly voltages
  • DOnly geometry
Q206

Statistics in discrete structures often summarize:

  • ADiscrete data and outcomes
  • BOnly continuous fluid motion
  • COnly calculus limits
  • DOnly 3D objects
Q207

The mean of values is:

  • ATheir maximum
  • BTheir average
  • CTheir median only
  • DTheir mode only
Q208

Variance measures:

  • ACentral tendency only
  • BSpread of data
  • COnly probability of one event
  • DPrime factorization
Q209

An algorithm is a:

  • AFinite sequence of well-defined steps to solve a problem
  • BRandom guess
  • CHardware device
  • DGraph only
Q210

An algorithm should terminate after:

  • AInfinite steps
  • BA finite number of steps
  • CAt least n! steps
  • DOnly one step
SECTION 5: Algorithms, Searching and Sorting (Q211-Q240)
Q211

Correctness of an algorithm means it:

  • AUses recursion
  • BProduces the intended output for valid inputs
  • CAlways runs in constant time
  • DUses arrays
Q212

Pseudocode is used to:

  • AWrite machine code directly
  • BDescribe algorithms in language-independent form
  • CStore data permanently
  • DDraw Venn diagrams
Q213

Linear search works by:

  • AChecking elements one by one
  • BDividing array into halves
  • CUsing a hash function always
  • DColoring a graph
Q214

Binary search requires the data to be:

  • AUnsorted
  • BSorted
  • CStored in a graph
  • DPrime numbers only
Q215

Binary search repeatedly:

  • AScans from start to end
  • BChecks the middle element and halves the search space
  • CSwaps adjacent elements
  • DCounts frequencies only
Q216

Worst-case time complexity of linear search is:

  • AO(1)
  • BO(log n)
  • CO(n)
  • DO(n^2)
Q217

Worst-case time complexity of binary search is:

  • AO(1)
  • BO(log n)
  • CO(n)
  • DO(n log n)
Q218

Sorting arranges data according to:

  • AA specified order
  • BA recurrence only
  • CA partition only
  • DA truth table only
Q219

Bubble sort repeatedly:

  • AMerges sorted halves
  • BSwaps adjacent out-of-order elements
  • CSelects minimum once only
  • DUses recursion necessarily
Q220

Selection sort repeatedly places:

  • AThe median at front
  • BThe smallest remaining element in correct position
  • CAll elements randomly
  • DThe last element first
Q221

Insertion sort builds:

  • AA heap
  • BA sorted portion one element at a time
  • CA graph
  • DA tree traversal
Q222

Merge sort uses the strategy of:

  • ABrute force only
  • BDivide and conquer
  • CGreedy coloring
  • DDynamic programming only
Q223

Quick sort partitions the array around a:

  • ARoot
  • BPivot
  • CLeaf
  • DSource vertex
Q224

Worst-case complexity of bubble sort is:

  • AO(log n)
  • BO(n)
  • CO(n^2)
  • DO(n log n)
Q225

Worst-case complexity of merge sort is:

  • AO(n^2)
  • BO(n log n)
  • CO(log n)
  • DO(n)
Q226

Merge sort is stable if:

  • AEqual elements keep their relative order
  • BIt always uses less memory
  • CIt is recursive
  • DIt uses a pivot
Q227

Binary search is an example of:

  • ADivide and conquer on sorted data
  • BBrute force graph traversal
  • CCounting principle
  • DEquivalence relation
Q228

The best data structure for breadth-first exploration of states is often a:

  • AStack
  • BQueue
  • CSet only
  • DMatrix
Q229

Depth-first processes are commonly implemented using:

  • AQueue
  • BStack
  • CPriority array only
  • DPigeonholes
Q230

Algorithm complexity is often expressed using:

  • ABig-O notation
  • BSet-builder notation only
  • CMod notation only
  • DPrime notation
Q231

O(n^2) grows compared to O(n log n) as n becomes large:

  • AMore slowly
  • BFaster
  • CExactly the same
  • DCannot compare
Q232

An invariant in sorting is:

  • AA property maintained during iterations
  • BAn output file
  • CA graph color
  • DA contradiction
Q233

A stable sort preserves:

  • ASorted order of all arrays
  • BRelative order of equal keys
  • COnly numeric arrays
  • DOnly recursive calls
Q234

A comparison-based sort cannot do better in worst case than:

  • AO(1)
  • BO(log n)
  • CO(n log n)
  • DO(n)
Q235

Recursive algorithms often use stack memory because of:

  • AFunction calls
  • BGraphs
  • CSet unions
  • DQuantifiers
Q236

An iterative procedure typically uses:

  • ALoops
  • BOnly recursion
  • COnly induction
  • DOnly relations
Q237

Algorithm analysis helps compare:

  • ACorrectness and efficiency
  • BOnly variable names
  • COnly comments
  • DOnly file formats
Q238

Searching a linked list efficiently with binary search is generally:

  • ASuitable
  • BNot suitable because random access is poor
  • CAlways O(1)
  • DOnly for graphs
Q239

A graph consists of:

  • AVertices and edges
  • BRows and columns only
  • CPremises and conclusions
  • DFunctions and inverses
Q240

A simple graph has:

  • ANo loops or multiple edges
  • BAt least one loop
  • CDirected edges only
  • DWeighted edges only
SECTION 6: Graph Theory and Graph Algorithms (Q241-Q275)
Q241

In an undirected graph, an edge {u,v} means:

  • AOrder matters
  • Bu and v are adjacent
  • Cu points to v only
  • DThere is a loop at u
Q242

The degree of a vertex in an undirected graph is:

  • ANumber of components
  • BNumber of incident edges
  • CNumber of colors
  • DGraph diameter
Q243

In a directed graph, the number of incoming edges is:

  • AOut-degree
  • BIn-degree
  • CDegree sum
  • DWeight
Q244

A path is:

  • AA closed walk only
  • BA sequence of vertices connected by edges
  • CA set of isolated vertices
  • DA coloring
Q245

A cycle is a path that:

  • AContains no edges
  • BBegins and ends at the same vertex
  • CUses all vertices necessarily
  • DHas length one only
Q246

A graph is connected if:

  • AIt has at least one vertex
  • BThere is a path between every pair of vertices
  • CEvery vertex has degree 2
  • DIt is planar
Q247

A connected acyclic graph is called a:

  • ATree
  • BCircuit
  • CPartition
  • DMatrix
Q248

The sum of degrees of all vertices in an undirected graph equals:

  • A|E|
  • B2|E|
  • C|V|
  • D|V|+|E|
Q249

A planar graph can be drawn:

  • AOnly on 3D paper
  • BWithout edges crossing
  • COnly with four colors
  • DOnly if complete
Q250

Euler's formula for a connected planar graph is:

  • AV+E=F
  • BV-E+F=2
  • CV-E-F=2
  • D2V=E+F
Q251

Graph coloring assigns:

  • ADirections to edges
  • BColors to vertices so adjacent vertices differ
  • CWeights to edges
  • DLabels to sets only
Q252

The chromatic number of a graph is:

  • ANumber of edges
  • BMinimum number of colors needed for proper coloring
  • CMaximum degree
  • DNumber of components
Q253

A bipartite graph can be colored with at most:

  • A1 color
  • B2 colors
  • C3 colors
  • D4 colors
Q254

A complete graph on n vertices is denoted by:

  • ACn
  • BKn
  • CPn
  • DTn
Q255

A complete graph Kn has how many edges?

  • An
  • Bn(n-1)/2
  • C2n
  • Dn!
Q256

A subgraph contains:

  • ASome subset of vertices and edges of a graph
  • BOnly all original edges
  • COnly all original vertices
  • DNo edges
Q257

A walk may:

  • ARepeat vertices and edges
  • BNever repeat anything
  • CContain no vertices
  • DBe only directed
Q258

A trail is a walk with no repeated:

  • AVertices
  • BEdges
  • CColors
  • DComponents
Q259

A simple path has no repeated:

  • AEdges only
  • BVertices
  • CWeights
  • DLabels
Q260

An Euler circuit uses:

  • AEvery vertex exactly once
  • BEvery edge exactly once and returns to start
  • COnly odd-degree vertices
  • DEvery color exactly once
Q261

A connected graph has an Euler circuit iff every vertex has:

  • AEven degree
  • BOdd degree
  • CDegree 1
  • DPrime degree
Q262

A Hamiltonian path visits:

  • AEvery edge once
  • BEvery vertex exactly once
  • COnly odd-degree vertices
  • DOnly leaves
Q263

A Hamiltonian cycle is a cycle that visits:

  • AEvery edge
  • BEvery vertex exactly once
  • COnly the root
  • DOnly the planar faces
Q264

Dijkstra's algorithm finds:

  • AA minimum coloring
  • BShortest paths from a source in graphs with nonnegative weights
  • CAn Euler circuit only
  • DTopological order for any graph
Q265

Breadth-first search on an unweighted graph finds:

  • ALongest paths
  • BShortest path lengths in number of edges from source
  • COnly cycles
  • DOnly spanning trees of minimum weight
Q266

Depth-first search is useful for:

  • AExploration and detecting connectivity/structure
  • BOnly modular arithmetic
  • COnly set difference
  • DOnly combinations
Q267

A spanning tree of a connected graph contains:

  • AAll vertices and no cycles
  • BAll edges
  • CNo vertices
  • DOnly weighted edges
Q268

A minimum spanning tree is defined for:

  • AWeighted connected graphs
  • BOnly directed graphs
  • COnly planar graphs
  • DEmpty graphs
Q269

Kruskal's algorithm builds a minimum spanning tree by:

  • AAdding lightest valid edges first
  • BUsing recursion only
  • CChoosing highest degree vertices
  • DColoring the graph
Q270

Prim's algorithm grows a minimum spanning tree from:

  • AA chosen start vertex
  • BA Hamiltonian cycle
  • CAn empty graph without edges
  • DThe complement graph
Q271

An adjacency matrix of a graph is especially convenient for:

  • ADense graphs
  • BSparse graphs only
  • CTrees only
  • DSequences only
Q272

An adjacency list is usually memory-efficient for:

  • ADense graphs only
  • BSparse graphs
  • CComplete graphs only
  • DTruth tables
Q273

Topological sorting applies to:

  • AUndirected connected graphs
  • BDirected acyclic graphs
  • CComplete graphs
  • DEuler graphs only
Q274

A tree is a connected graph with:

  • AExactly one cycle
  • BNo cycles
  • CExactly two components
  • DWeighted edges only
Q275

A rooted tree is a tree with:

  • AA selected root vertex
  • BAll leaves removed
  • CExactly two roots
  • DAll degrees even
SECTION 7: Trees, Rooted Trees and Traversals (Q276-Q300)
Q276

In a rooted tree, the parent of a node is:

  • AAny adjacent node
  • BThe node directly above it toward the root
  • CAny child node
  • DThe farthest node
Q277

A leaf in a tree is a vertex with:

  • ANo children
  • BExactly two children
  • CMaximum weight
  • DNo parent
Q278

The level or depth of a node is its distance from the:

  • ALeaf
  • BRoot
  • CLargest subtree
  • DGraph center
Q279

The height of a rooted tree is:

  • ANumber of vertices only
  • BMaximum depth of any node
  • CNumber of leaves only
  • DDegree of root
Q280

A binary tree is a rooted tree where each node has at most:

  • A1 child
  • B2 children
  • C3 children
  • D4 children
Q281

A full binary tree is one in which every internal node has:

  • AExactly 2 children
  • BAt most 1 child
  • CExactly 3 children
  • DNo children
Q282

A complete binary tree fills levels:

  • ARandomly
  • BFrom left to right except possibly last level
  • COnly from right
  • DOnly with leaves
Q283

Preorder traversal visits:

  • ALeft, root, right
  • BRoot, left, right
  • CLeft, right, root
  • DRoot, right, left only
Q284

Inorder traversal of a binary tree visits:

  • ARoot, left, right
  • BLeft, root, right
  • CLeft, right, root
  • DRoot only
Q285

Postorder traversal visits:

  • ARoot, left, right
  • BLeft, root, right
  • CLeft, right, root
  • DRight, root, left
Q286

Level-order traversal is commonly implemented using a:

  • AStack
  • BQueue
  • CSet
  • DRecurrence only
Q287

Expression trees are useful for representing:

  • AArithmetic expressions
  • BOnly graph paths
  • CSet partitions
  • DProofs by contradiction
Q288

A subtree of a node consists of:

  • AThat node and all its descendants
  • BOnly its siblings
  • COnly its parent
  • DOnly leaf nodes
Q289

A forest is:

  • AA set of disjoint trees
  • BA graph with cycles
  • CA complete graph
  • DA rooted sequence
Q290

Removing the root from a rooted tree yields:

  • AA contradiction
  • BA forest of subtrees
  • CA complete graph
  • DA cycle
Q291

For any tree with n vertices, the number of edges is:

  • An
  • Bn-1
  • C2n
  • Dn+1
Q292

A tree with one root and branching choices naturally models:

  • AHierarchical data
  • BOnly modular arithmetic
  • COnly logic tables
  • DOnly sorting output
Q293

File systems and organization charts are often modeled using:

  • ARooted trees
  • BEuler circuits
  • CEquivalence classes
  • DBiconditionals
Q294

A spanning tree of a graph helps remove:

  • AVertices
  • BCycles while keeping connectivity
  • CAll edges
  • DAll paths
Q295

Decision trees in computing represent:

  • AChoices and outcomes
  • BOnly graph colorings
  • COnly number theory
  • DOnly set complements
Q296

The children of a node are:

  • ANodes directly below it
  • BAll adjacent nodes
  • CIts ancestors
  • DAll leaves
Q297

The siblings of a node are nodes that share the same:

  • AChild
  • BParent
  • CDepth only
  • DSubtree
Q298

Traversals are important because they define systematic ways to:

  • AVisit all nodes
  • BColor all edges
  • CFind modular inverses
  • DCreate contradictions
Q299

A balanced binary search tree generally supports search in:

  • AO(n^2)
  • BO(log n) average height behavior
  • CO(2^n)
  • DO(n!)
Q300

Depth-first traversal of a tree is naturally expressed using:

  • ARecursion or an explicit stack
  • BOnly a queue
  • COnly sorting
  • DOnly matrix multiplication

Leave a Reply

Your email address will not be published. Required fields are marked *