Consider the basic block given below.

a = b + c

c = a + d

d = b + c

e = d - b

a = e + b

The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are

This question was previously asked in
GATE CS 2014 Official Paper: Shift 3
View all GATE CS Papers >
  1. 6 and 6
  2. 8 and 10
  3. 9 and 12
  4. 4 and 4

Answer (Detailed Solution Below)

Option 1 : 6 and 6
Free
GATE CS Full Mock Test
5.4 K Users
65 Questions 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

Explanation:

  • c can be written as : b+c+d
  • d can be written as : b+b+c+d
  • e can be written as : b+c+d
  • a can be written as : b+b+c+d


DAG:

F1 Raju Madhu 17.07.20 D3

  • Total nodes are 8 but nodes b + b + c + d and b + c + d are repeated so only one time will be counted so total nodes are 8 - 2 = 6.
  • Each repeated nodes has two edges so total edges will be 10 - 4 = 6


Hence 6 and 6 is the correct answer.

Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

Get Free Access Now
Hot Links: teen patti bindaas teen patti game online teen patti club apk