पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 16 के उत्तर और हल FliQi Question Bank app में।
भाषा
प्रश्न 1उत्तर + हल
n शीर्षों और e किनारों वाले अदिशात्मक (undirected) graph G में सभी शीर्षों की डिग्री का योग क्या होता है?
For an undirected graph G with n vertices and e edges, the sum of the degrees of all vertices is
Ane
B2n
C2e
Den
सही उत्तर / Answer: (C)
हल / Solution
हर किनारा (edge) ठीक दो शीर्षों को जोड़ता है, इसलिए वह दोनों शीर्षों की डिग्री में एक-एक बार गिना जाता है। इसी से सभी डिग्री का योग किनारों का दोगुना, यानी 2e हो जाता है — इसे हस्तमिलाप प्रमेयिका (handshaking lemma) कहते हैं। इसका एक नतीजा यह है कि विषम डिग्री वाले शीर्षों की संख्या हमेशा सम होती है। जाँच: n शीर्षों वाले ट्री में किनारे n − 1 होते हैं, तो डिग्री का योग 2(n − 1) निकलता है।
Every edge joins exactly two vertices, so it is counted once in the degree of each of them. That makes the sum of all degrees twice the edge count, that is 2e, a fact known as the handshaking lemma. One consequence is that the number of vertices of odd degree is always even. Check it on a tree with n vertices, which has n minus 1 edges, so the degrees there add up to 2 times n minus 1.
प्रश्न 2उत्तर + हल
{v1 … vn} पर एक weighted complete graph है, जिसमें किनारे (vi, vj) का भार 2|i − j| है। इसके न्यूनतम स्पैनिंग ट्री (MST) का भार क्या होगा?
In a weighted complete graph on {v1 … vn}, the edge (vi, vj) has weight 2|i − j|. The weight of its minimum spanning tree (MST) is
An − 1
B2n − 2
C(n/2)
Dn2
सही उत्तर / Answer: (B)
हल / Solution
सबसे सस्ते किनारे वे हैं जहाँ |i − j| = 1, यानी लगातार आने वाले शीर्षों को जोड़ने वाले किनारे; हर एक का भार 2 है। n शीर्षों के स्पैनिंग ट्री में n − 1 किनारे लगते हैं, और v1–v2, v2–v3 … वाली शृंखला सभी शीर्ष जोड़ देती है। कुल भार 2 × (n − 1) = 2n − 2 हुआ। जाँच: n = 3 पर दो किनारे, भार 4। n − 1 तब आता जब हर भार 1 होता।
The cheapest edges are those with an index gap of one, that is, edges joining consecutive vertices, and each of them weighs 2. A spanning tree over n vertices needs n minus 1 edges, and the chain v1 to v2, v2 to v3 and so on links every vertex. So the total weight is 2 times (n minus 1), which is 2n minus 2. Check with n equal to 3: two edges, weight 4.
प्रश्न 3उत्तर + हल
किसी graph में articulation point (कट शीर्ष) क्या होता है?
What is an articulation point in a graph?
Aसबसे अधिक डिग्री वाला शीर्षVertex with highest degree
Bवह शीर्ष जिसे हटाने पर graph टूटकर अलग हो जाता हैVertex whose removal disconnects the graph
Cसबसे कम डिग्री वाला शीर्षVertex with lowest degree
Dgraph का मूल (root) शीर्षRoot of the graph
सही उत्तर / Answer: (B)
हल / Solution
articulation point या कट शीर्ष (cut vertex) वह शीर्ष है जिसे और उसके किनारों को हटा देने पर जुड़ा हुआ graph दो या अधिक टुकड़ों में बँट जाता है। यह नेटवर्क की कमज़ोर कड़ी बताता है — जैसे वह router, जिसके बैठ जाने से नेटवर्क टूट जाए। इसे खोजने का तरीक़ा गहराई-पहले खोज (DFS) पर टिका है, जिसमें discovery time और low-link मान से O(V+E) समय में काम हो जाता है। डिग्री से इसका सीधा संबंध नहीं।
An articulation point, also called a cut vertex, is a vertex whose removal along with its edges splits a connected graph into two or more pieces. It marks the weak link of a network, like a router whose failure cuts the network in half. Such vertices are found by a depth first search that keeps discovery times and low-link values, in time of the order V plus E. Degree has no direct bearing on it.
प्रश्न 4उत्तर + हल
किसी graph में चाल (walk) की लंबाई होती है —
Length of the walk of a graph is
Aचाल W में शीर्षों (vertices) की संख्याthe number of vertices in walk W
Bचाल W में किनारों (edges) की संख्याthe number of edges in walk W
Cgraph में किनारों की कुल संख्याtotal number of edges in a graph
Dgraph में शीर्षों की कुल संख्याtotal number of vertices in a graph
सही उत्तर / Answer: (B)
हल / Solution
चाल (walk) की लंबाई उसमें घूमे गए किनारों (edges) की संख्या होती है। जैसे चाल A → B → C → D में तीन किनारे पार होते हैं, इसलिए लंबाई 3 है, जबकि शीर्ष चार हैं। यानी शीर्ष गिनने पर उत्तर एक ज़्यादा आ जाता है, इसलिए पहला विकल्प ग़लत है। बाक़ी दो विकल्प पूरे graph की गिनती बताते हैं — कुल शीर्ष graph का क्रम (order) है और कुल किनारे उसका आकार (size), चाल की लंबाई नहीं।
The length of a walk is the number of edges travelled along it. In the walk A to B to C to D three edges are crossed, so the length is 3, while the vertex count is four. Counting vertices gives an answer one too large, which is why the first option fails. The last two options describe the whole graph: the vertex total is its order and the edge total is its size.
प्रश्न 5उत्तर + हल
किसी चाल (walk) के पहले और अंतिम शीर्ष को छोड़कर बाक़ी सभी शीर्षों को क्या कहा जाता है?
All the vertices of a walk except the very first and the very last vertex, are called
किसी चाल (walk) में दो सिरे ख़ास होते हैं — शुरू का शीर्ष और अंत का शीर्ष। इनके बीच पड़ने वाले सभी शीर्ष इंटरमीडिएट शीर्ष (intermediate vertices) कहलाते हैं। जैसे चाल A → B → C → D में B और C इंटरमीडिएट हैं। आसन्न (adjacent) का मतलब बस यह है कि दो शीर्ष एक किनारे से जुड़े हैं, चाल में उनकी जगह से कोई मतलब नहीं। internal शब्द ट्री में चलता है, पत्ती न होने वाले शीर्ष के लिए।
A walk has two special ends: the starting vertex and the finishing vertex. Every vertex lying between them is called an intermediate vertex. In the walk A to B to C to D, the vertices B and C are the intermediate ones. Adjacent means only that two vertices share an edge, which says nothing about their place in a walk. The word internal belongs to trees, where a vertex that is not a leaf is called internal.
प्रश्न 6उत्तर + हल
graph G का वह पथ (path), जिसमें G का हर शीर्ष ठीक एक बार आता है, क्या कहलाता है?
A path in graph G, which contains every vertex of G one and only once?
Dहैमिल्टनियन टूर (Hamiltonian tour)Hamiltonian tour
सही उत्तर / Answer: (B)
हल / Solution
जिस पथ में graph का हर शीर्ष ठीक एक बार आता है, उसे हैमिल्टनियन पथ (Hamiltonian path) कहते हैं। हैमिल्टनियन टूर या परिपथ (circuit) इससे आगे की बात है — वह शुरू वाले शीर्ष पर लौट आता है, इसलिए उसमें एक शीर्ष दो बार आता है, और प्रश्न ऐसा लौटना नहीं माँग रहा। यूलर टूर और यूलर ट्रेल में गिनती किनारों (edges) की होती है, शीर्षों की नहीं — उनमें हर किनारा एक बार घूमा जाता है।
A path that contains every vertex of the graph exactly once is called a Hamiltonian path. A Hamiltonian tour, or circuit, goes one step further by returning to the starting vertex, so there one vertex appears twice, and the question asks for no such return. An Euler tour and an Euler trail are about edges rather than vertices: in them every edge is covered once, while a vertex may well be visited again.
प्रश्न 7उत्तर + हल
पूर्ण graph Kn में ......... भिन्न स्पैनिंग ट्री (spanning trees) होते हैं।
The complete graph Kn has .......... different spanning trees.
Ann−2
Bn × n
Cnn
Dn2
सही उत्तर / Answer: (A)
हल / Solution
पूर्ण graph में स्पैनिंग ट्री गिनने के लिए केली का सूत्र (Cayley's formula) है — Kn में nn−2 भिन्न स्पैनिंग ट्री होते हैं। जाँच कीजिए: n = 3 पर 31 = 3, और त्रिभुज में सचमुच तीन ही स्पैनिंग ट्री बनते हैं, क्योंकि हर बार एक किनारा हटाना पड़ता है। n = 4 पर 42 = 16 मिलते हैं। बाक़ी विकल्प इसी जाँच पर गिर जाते हैं — n = 3 पर वे 9, 27 और 9 बताते हैं।
Spanning trees of a complete graph are counted by Cayley's formula: Kn has n to the power n minus 2 of them. Check it with n equal to 3, which gives 3, and a triangle really has just three spanning trees, since one edge has to be dropped each time. For n equal to 4 the formula gives 16. The other choices fail the same check, because at n equal to 3 they would give 9, 27 and 9 instead.
प्रश्न 8उत्तर + हल
n शीर्षों वाले पूर्ण graph (complete graph) में किनारों की कुल संख्या होती है —
The total number of edges in a complete graph of n vertices is
An
Bn2/2
Cn(n + 1)/2
Dn(n − 1)/2
सही उत्तर / Answer: (D)
हल / Solution
पूर्ण graph (complete graph) में हर शीर्ष बाक़ी हर शीर्ष से जुड़ा होता है, इसलिए हर शीर्ष की डिग्री n − 1 होती है। सभी डिग्री का योग n(n − 1) हुआ, और वह योग किनारों का दोगुना होता है। इसलिए किनारे = n(n − 1)/2। जाँच: K4 में 4 × 3/2 = 6 किनारे, जो सही है। n(n + 1)/2 लिखने पर हर शीर्ष का अपने से भी जोड़ गिन लिया जाता, और n2/2 पूर्णांक भी नहीं देता।
In a complete graph every vertex is joined to every other vertex, so each vertex has degree n minus 1. The degrees add up to n(n minus 1), and that sum is twice the number of edges. Hence the edge count is n(n minus 1)/2. Check it on K4: 4 times 3 divided by 2 gives 6 edges, which is right. The form with n plus 1 would also count a loop at each vertex.
प्रश्न 9उत्तर + हल
एक जुड़ा हुआ graph G आयलर graph (Euler graph) तभी होता है जब G के सभी शीर्षों की डिग्री हो —
A connected graph G is a Euler graph if and only if all vertices of G are of
Aसमान डिग्री (same degree)same degree
Bसम डिग्री (even degree)even degree
Cविषम डिग्री (odd degree)odd degree
Dभिन्न डिग्री (different degree)different degree
सही उत्तर / Answer: (B)
हल / Solution
आयलर graph में एक ही बंद चाल (closed walk) से हर किनारा ठीक एक बार घूम लिया जाता है। हर शीर्ष में जितनी बार घुसा जाता है उतनी ही बार निकलना पड़ता है, इसलिए किनारे जोड़े में बँटते हैं और हर शीर्ष की डिग्री सम (even) होनी चाहिए। graph जुड़ा हुआ भी हो, यह दूसरी शर्त है। डिग्री समान होना ज़रूरी नहीं — 2 और 4 मिलकर भी चल जाता है। विषम डिग्री मिलते ही बंद चाल टूटती है।
In an Euler graph one closed walk covers every edge exactly once. At each vertex you must leave as often as you enter, so the edges there pair up and the degree of every vertex has to be even. The graph must also be connected, which is the second condition. The degrees need not be equal: a mix of 2 and 4 works fine. One vertex of odd degree breaks the closed walk.
प्रश्न 10उत्तर + हल
graph को घूमने (graph traversal) की विधि है —
Method of graph traversal is
Aगहराई-पहले खोज (depth first search)depth first search
Bचौड़ाई-पहले खोज (breadth first search)breadth first search
C(a) और (b) दोनोंBoth (a) and (b)
Dलंबाई-पहले खोज (length first search)length first search
सही उत्तर / Answer: (C)
हल / Solution
graph को घूमने की दो मानक विधियाँ हैं — गहराई-पहले खोज (depth first search, DFS) और चौड़ाई-पहले खोज (breadth first search, BFS)। DFS एक रास्ते पर जहाँ तक जा सके जाती है, फिर पीछे लौटती है, और इसमें स्टैक लगता है। BFS स्तर-दर-स्तर चलती है और उसमें क्यू लगती है। दोनों ही विधियाँ हैं, इसलिए अकेला (a) या अकेला (b) अधूरा उत्तर है। 'लंबाई-पहले खोज' नाम की कोई विधि होती ही नहीं, वह गढ़ा हुआ विकल्प है।
A graph is traversed by two standard methods: depth first search and breadth first search. Depth first search goes as far along one route as it can and then backs up, and it uses a stack. Breadth first search moves level by level and uses a queue. Since both are genuine methods, picking only (a) or only (b) leaves the answer half done. There is no method called length first search, so that option is simply invented.
आगे के 16 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
किसी ग्राफ़ में सभी जोड़ों के बीच लघुतम पथ (all pairs shortest path) निकालने वाले एल्गोरिथ्म की समय जटिलता किससे सीमित होती है? (n = शीर्षों की संख्या)
The time complexity of the all pairs shortest path algorithm can be bounded by (n = number of vertices)