KonkurStudy
کنکور ارشد علوم کامپیوتر

کارت‌های مفهوم و فرمول کنکور ارشد علوم کامپیوتر

همهٔ 285 کارت مطالعهٔ کنکور کارشناسی ارشد علوم کامپیوتر — فرمول‌ها، قضیه‌ها، تعریف‌ها، الگوریتم‌ها و نکته‌ها، هر کدام با پیوند به سوالاتی که آن را می‌سنجند.

241–285 از 285

مفهومآمار و احتمال
Probability by Counting Equally-Likely Pairs

When two distinct objects are drawn at random from a set, every unordered pair is equally likely, so the probability of any event is (favorable pairs) / C(n,2) — reducing the problem to two separate counts.

classical-probabilitycountingunordered-pairscombinations
قضیهآمار و احتمال
The Extra-Toss Symmetry Argument (More-Heads Problem)

If one player tosses a fair coin one more time than another, the probability that the first gets strictly more heads is exactly $\tfrac12$ — proved by a clean symmetry split, no binomial sums needed.

probabilitysymmetry-argumentbinomial-distributionfair-coin
مفهومنظریه زبان‌ها و ماشین‌ها
How head-movement restrictions change a Turing machine's power

Adding a **Stay** option keeps a TM at full recursively-enumerable power, but forbidding the head from re-scanning what it already passed collapses it: a head that can never (or only once) move back toward the start reads each cell at most once and recognizes only **regular** languages.

turing-machinehead-movementstay-optionrecursively-enumerable
مفهومنظریه زبان‌ها و ماشین‌ها
Turing reducibility: direction, equivalence, and reduction to the complement

A <=T B means a decider for A exists given an oracle for B. Solvability flows OPPOSITE the arrow (B easy => A easy), <=T is a preorder not a partial order (mutual reduction gives Turing-equivalence, not equality), and oracles are closed under complement, so A <=T A^c always.

turing-reducibilityoracle-turing-machinedecidabilityundecidability
مفهومطراحی الگوریتم
Merge Sort with a Constant-Size Insertion-Sort Cutoff

Stopping merge-sort recursion at blocks of a *constant* size $k$ and finishing each block with insertion sort keeps the running time at $\Theta(n\log n)$; the cutoff only shaves a constant factor. The bound changes only when $k$ is allowed to grow with $n$.

merge-sortinsertion-sortcutoffcoarsening
مفهومطراحی الگوریتم
Nested Self-Referential Recurrences (Hofstadter G-Sequence)

When the recurrence feeds its own output back into itself, like G(n)=n-G(G(n-1)), unroll a few terms and look for a golden-ratio floor closed form.

recurrenceself-referentialhofstadtergolden-ratio
الگوریتمطراحی الگوریتم
Solving Recurrences by Change of Variable (n = 2^m)

When a recurrence shrinks $n$ by a constant *factor* (e.g. $n\to n/2$ or $n\to\sqrt{n}$), the substitution $n=2^{m}$ converts division into subtraction, turning a hard recurrence in $n$ into an easy one in $m$ that you can unroll or hit with the Master Theorem.

change-of-variablesubstitutionrecurrencedivide-and-conquer
الگوریتمطراحی الگوریتم
Binary Search on a Rotated Sorted Array

A sorted array cyclically rotated by some unknown amount still hides enough order to binary-search it in $\Theta(\log n)$: there is exactly one "drop" where $A[i]>A[i+1]$, and at every midpoint one half is guaranteed sorted, so you can find the pivot, the minimum, the maximum, or any target in logarithmic time.

rotated-sorted-arraybinary-searchpivot-searchfind-minimum
قضیهریاضی عمومی
Agreement on a Dense Set Forces Equality of Continuous Functions

Two continuous functions that agree on a dense set (like $\mathbb{Q}$) are equal everywhere; one continuous function with a constant value on a dense set is that constant.

continuitydense-setrationalsirrationals
فرمولریاضی عمومی
Improper Integral 1/(x√(1+x²)) via Substitution to an Inverse Hyperbolic

Integrals of the form 1/(x·√(x²±a²)) are antidifferentiated by the reciprocal substitution x = 1/t, which collapses them to ±1/√(1±t²) — an inverse-hyperbolic (or arcsin) form. The improper version converges because the tail decays like 1/x².

improper-integralsubstitutioninverse-hyperbolicarcsinh
مفهومریاضی عمومی
Nonexistence of a Two-Variable Limit by the Path Test

A limit of $f(x,y)$ as $(x,y)\to(a,b)$ exists only if it equals the same value along every path to $(a,b)$. Finding two paths that give different values proves the limit does not exist.

multivariable-limitpath-testnonexistencecalculus
فرمولریاضی عمومی
Area in Polar Coordinates: ½∫r²dθ and Regions Between Polar Curves

Area swept by a polar curve is the sum of thin circular sectors, giving A = ½∫ r² dθ; for a region between two curves integrate ½(r_outer² − r_inner²), and for an overlap take the smaller radius on each ray.

polar-coordinatesareaintegrationroses
مفهومریاضی عمومی
Degree of Precision and Error Term of a Quadrature Rule via Taylor Expansion

A quadrature rule $\int_a^b f \approx Q$ has degree of precision $d$ if it is exact for every polynomial of degree $\le d$ but not for degree $d+1$. Taylor-expanding both sides about a point and matching terms reveals $d$ and the leading error: the first mismatched power gives an error $\propto h^{d+2} f^{(d+1)}(\xi)$.

quadraturedegree-of-precisionnumerical-integrationerror-term
قضیهریاضی عمومی
Squeeze Theorem for the Limit of an n-Term Sum

A sum whose number of terms grows with n is squeezed by replacing every term with the largest and smallest term; if both bounds (each n copies of a single term) share a limit, the sum has that limit too.

squeeze-theoremsandwich-theoremlimitssequences
فرمولریاضی عمومی
Surface Area of a Graph z=f(x,y) via the Double Integral √(1+f_x²+f_y²)

The area of the piece of a surface z=f(x,y) lying above a region R in the xy-plane is the double integral over R of √(1+f_x²+f_y²) — the local stretch factor between the surface and its shadow.

surface-areadouble-integralmultivariable-calculusgraph-of-a-function
الگوریتمریاضیات گسسته
Averaging over All Permutations via Linearity of Expectation

To average a permutation statistic over all of $S_n$, write it as a sum of indicators and use linearity of expectation — one object at a time.

linearity-of-expectationpermutationsindicator-random-variablesdouble-counting
الگوریتمریاضیات گسسته
Counting Regions of a Curve Arrangement via Euler's Formula

Treat the curves as a planar graph and apply Euler's formula r = E - V + 1 + C: count intersection points (V) and arcs (E), then read off the number of regions.

combinatoricscountingeuler-formulaplanar-graph
مفهومریاضیات گسسته
Decidable vs. Recursively Enumerable Theories

Decidable = an algorithm always halts with the right yes/no; recursively enumerable (r.e.) = halts only on the YES-instances. Every decidable set is r.e., but not conversely — and the gap is exactly where logic problems live.

decidabilityrecursively-enumerablerecognizablesemidecidable
مفهومریاضیات گسسته
Independent (Irredundant) Bases of a Theory

A base of a set of propositions $\Gamma$ is a subset that proves all of $\Gamma$ yet has no redundant member — a minimal generating set for the deductive closure of $\Gamma$.

propositional-logicproof-theoryderivabilityindependence
الگوریتمریاضیات گسسته
Counting Monotone Lattice Paths (Forced Waypoints)

A monotone path that takes a right-steps and b up-steps can be arranged in C(a+b, b) ways; to force a path through a checkpoint, count each leg separately and multiply.

combinatoricscountinglattice-pathsmonotone-paths
قضیهریاضیات گسسته
Path Ramsey Numbers and Monochromatic Paths

The path Ramsey number $R(P_m,P_n)$ — the least $N$ so every red/blue coloring of $K_N$ has a red $P_m$ or blue $P_n$ — has the closed form $R(P_m,P_n)=m+\lfloor n/2\rfloor-1$ for $m\ge n\ge 2$; e.g. $R(P_4,P_4)=5$.

ramsey-numbermonochromatic-pathpath-ramseyedge-coloring
مفهومریاضیات گسسته
Recursive Functions on Formulas and Structural Induction

A function defined by recursion on a formula's parse tree is pinned down by structural induction; when each connective contributes a distinct prime factor, unique factorization reads back every connective count from the single value f(A).

propositional-logicstructural-inductionrecursive-definitioninductively-defined-function
الگوریتمساختمان داده
Deleting a Node with Two Children from a BST

To delete a node with two children, overwrite its key with its in-order predecessor (max of the left subtree) or successor (min of the right subtree), then delete that easier node.

binary-search-treebst-deletionin-order-successorin-order-predecessor
مفهومساختمان داده
Complete Binary Tree: Maximum Left-Subtree Size of the Root

In a complete binary tree of n nodes, the root's left subtree is largest when the last level fills the left side first; its size is then a full tree of height h-1 plus the overflow leaves, capped at 2^h-1.

complete-binary-treebinary-heaptreesleft-subtree
الگوریتمساختمان داده
Recursive Tree Height: max(left, right) + 1

The height of a tree is one more than the taller of its two subtrees; recurse to the leaves and combine on the way back up.

binary-treetree-heightrecursionpost-order-traversal
مفهومآمار و احتمال
Adjacency Probability in a Row via the Block (Gluing) Method

Treat objects that must stay together as one glued block, then multiply by the internal orderings — the standard tool for computing probabilities of adjacency in a random row arrangement.

countingcombinatoricspermutationsblock-method
مفهومآمار و احتمال
Zero Standard Deviation Forces Constant Data

A dataset has zero variance (equivalently zero standard deviation) if and only if every value is identical; then the mean, median, every percentile, and the single distinct value all collapse to that same constant.

variancestandard-deviationconstant-datapercentile
مفهومنظریه زبان‌ها و ماشین‌ها
Proving a grammar ambiguous (and language equivalence): the dangling-else example

A CFG is ambiguous iff some string has two distinct leftmost derivations (equivalently, two distinct parse trees) — exhibit ONE such string to prove it. Ambiguity is a property of the grammar, not the language: two grammars can generate the same language while one is ambiguous and the other unambiguous, as the classic dangling-else grammar shows.

ambiguitycontext-free-grammarleftmost-derivationparse-tree
مفهومنظریه زبان‌ها و ماشین‌ها
Empty and finite languages are regular: regular subsets of any language

The empty language and every finite language are regular, so a non-regular language must be infinite and nonempty. Two cheap regular subsets sit inside ANY language L: the empty set, and any finite subset you pick. Use these facts to instantly kill exam claims like 'some language has no regular subset' or 'a non-regular language could be finite'.

empty-languagefinite-languageregular-languageregular-subset
مفهومنظریه زبان‌ها و ماشین‌ها
Inherently ambiguous CFLs and the DCFL / unambiguous-CFL / CFL hierarchy

Ambiguity is a property of a **grammar** (a string with $\ge 2$ parse trees); *inherent* ambiguity is a property of a **language** (every grammar for it is ambiguous). These nest into a strict chain $\text{Regular}\subsetneq\text{DCFL}\subsetneq\text{Unambiguous CFL}\subsetneq\text{CFL}$: every deterministic CFL is unambiguous, but some CFLs are inherently ambiguous and lie outside even the unambiguous class.

context-freeinherent-ambiguityambiguous-grammardcfl
مفهومنظریه زبان‌ها و ماشین‌ها
NFAs With No ε-Moves and a Single Accepting State: When the Start Must Accept

Drop ε-transitions and force one accepting state, and if ε∈L the start must equal that accepting state — which forces every accepted string to loop back, making L closed under concatenation.

nfaepsilon-transitionsfinite-automataaccepting-state
مفهومنظریه زبان‌ها و ماشین‌ها
Turing-recognizable (RE) languages: closure properties and domain/range characterization

L is RE iff it is the DOMAIN of a partial computable function, iff it is the RANGE of one (or empty), iff it is enumerable. RE is closed under finite union/intersection, concatenation, star, homomorphism, and EFFECTIVE countable union (dovetailing) — but NOT under complement nor arbitrary countable union.

recursively-enumerableturing-recognizablesemidecidableclosure-properties
قضیهنظریه زبان‌ها و ماشین‌ها
Every context-free language over a unary alphabet is regular (Parikh)

Over a one-letter alphabet the language hierarchy collapses: every context-free L over a single symbol is already regular. This follows from Parikh's theorem (CFL Parikh images are semilinear, and over a unary alphabet the Parikh image IS the language, so the set of lengths is eventually periodic = regular). It does NOT say arbitrary subsets of a^* are regular.

parikh-theoremunary-alphabetcontext-free-languageregular-language
قضیهریاضی عمومی
The Distance Function: $\{x : d(x,A)=0\}$ Is the Closure of $A$

The set of points at distance zero from $A$ is exactly $\overline{A}$, so it is always closed, contains $A$, and equals $A$ iff $A$ is closed.

closureclosed-setdistance-functionlimit-point
الگوریتمطراحی الگوریتم
Matrix-Chain Multiplication Ordering

Matrix multiplication is associative but its scalar-multiplication cost is not, so dynamic programming over interval splits finds the cheapest parenthesization in $\Theta(n^{3})$ time.

matrix-chainparenthesizationinterval-dpdynamic-programming
مفهومطراحی الگوریتم
Radix Sort and the Stable-Subroutine Requirement

LSD radix sort is correct only if the per-digit auxiliary sort is stable, so heapsort and quicksort cannot be plugged in while stable counting sort can.

radix-sortstable-sortauxiliary-sortcounting
فرمولریاضیات گسسته
Counting Finite Structures of a First-Order Language

To turn an n-element universe into a structure you interpret each symbol independently and multiply: a k-ary relation gives 2^(n^k) choices, a k-ary function gives n^(n^k), and a constant gives n.

first-order-logicmodel-theorystructure-interpretationcounting
مفهومریاضیات گسسته
Transitive Closure of a Relation

The transitive closure $R^{+}$ is the smallest transitive relation containing $R$: it adds $(x,y)$ whenever a directed path of length $\ge 1$ runs from $x$ to $y$.

transitive-closureclosuretransitivitybinary-relation
فرمولساختمان داده
Row-Major vs Column-Major Storage and Address Arithmetic

A multi-dimensional array is flattened into linear memory either row-by-row (row-major) or column-by-column (column-major), and you locate any cell with a base-plus-offset address formula.

arraymatrix-storagerow-majorcolumn-major
قضیهریاضی عمومی
Comparison Test for Improper Integrals

For nonnegative integrands, domination decides convergence: if $0\le f\le g$ then $\int g<\infty$ forces $\int f<\infty$, and $\int f=\infty$ forces $\int g=\infty$.

comparison-testimproper-integralconvergencelimits-at-infinity
مفهومریاضیات گسسته
Iterated Power Sets and the von Neumann Construction of Finite Ordinals

Each finite ordinal is the set of all smaller ordinals, so $n=\{0,1,\dots,n-1\}$; inside an iterated power set $\mathcal{P}^k(\emptyset)$ only finitely many subsets happen to be exactly such ordinals.

set-theoryvon-neumann-ordinalsiterated-power-settransitive-set
الگوریتمطراحی الگوریتم
Fractional Knapsack (Greedy by Value Density)

Sort items by value-to-weight ratio and fill the knapsack greedily, taking a fraction of the last item; this is provably optimal for the fractional knapsack, unlike 0/1.

greedyfractional-knapsackvalue-densityprofit-to-weight-ratio
الگوریتمطراحی الگوریتم
Job Sequencing with Deadlines (Greedy on a Matroid)

Schedule unit-time jobs for maximum profit by taking them in decreasing-profit order and placing each in the latest free slot before its deadline — provably optimal because the feasible sets form a matroid.

greedyjob-sequencingdeadlinesscheduling
الگوریتمساختمان داده
Binary Heaps: Heapify and Build-Heap

A binary heap is a complete binary tree stored in an array; MAX-HEAPIFY repairs one node by sifting it down in $\Theta(\lg n)$, while BUILD-MAX-HEAP turns an unordered array into a heap bottom-up in $\Theta(n)$ — not $\Theta(n\lg n)$.

binary-heapmax-heapmin-heapheapify
مفهومنظریه زبان‌ها و ماشین‌ها
DFAs for a Forbidden Substring (Trap States)

Recognize "strings that avoid a fixed pattern" with a DFA that tracks the longest matched prefix of the pattern and drops into an absorbing non-accepting trap state the instant the whole pattern appears.

dfatrap-statedead-stateforbidden-substring