Step 1

Let the discrete mathematics course be represented by M, the Object-Oriented Programming course by O, and the Digital Logic course by L.

Now, n(A) represents the number of students who took course A, and \(\displaystyle{n}{\left({A}\cap{B}\right)}{n}{A}\cap{B}\) represent number of students who took both courses A and B and \(\displaystyle{n}{\left({A}\cap{B}\cap{C}\right)}\) represent number of students who took all three courses A, B, and C.

Now, 64 had taken Discrete mathematics course, therefore, n(M)=64

94 had taken Object-Oriented Programming course, therefore, n(O)=94

58 had taken Digital Logic course, therefore, n(L)=58

28 had taken Discrete Mathematics and Digital Logic, therefore, \(\displaystyle{n}{\left({M}\cap{L}\right)}={28}\)

26 had taken Discrete Mathematics and Object-Oriented Programming, therefore, \(\displaystyle{n}{\left({M}\cap{O}\right)}={26}\)

22 had taken Object-Oriented Programming and Digital Logic course, \(\displaystyle{n}{\left({O}\cap{L}\right)}={22}\)

14 had taken all the three courses, therefore, \(\displaystyle{n}{\left({M}\cap{O}\cap{L}\right)}={14}\).

Hence,

\(\displaystyle{n}{\left({M}\right)}={64}\)

\(\displaystyle{n}{\left({O}\right)}={94}\)

\(\displaystyle{n}{\left({L}\right)}={58}\)

\(\displaystyle{n}{\left({M}\cap{L}\right)}={28}\)

\(\displaystyle{n}{\left({M}\cap{O}\right)}={26}\)

\(\displaystyle{n}{\left({O}\cap{L}\right)}={22}\)

\(\displaystyle{n}{\left({M}\cap{O}\cap{L}\right)}={14}\)

Step 2

Now, let us make a Venn diagram and represent the situation:

Here, the discrete mathematics course is represented by the red color circle, the Object-Oriented Programming course is represented by the black color circle, and the Digital Logic course is represented by the blue color circle.

Now, the students who have taken only the discrete mathematics course can be found by subtracting the number of students who take Discrete Mathematics and Digital Logic and the number of students who take Discrete Mathematics and Object-Oriented Programming from all the students who take Discrete Mathematics course.

But then the part that is common to all three circles gets subtracted twice. So, add the number of students who take all three courses.

In short,

\(\displaystyle{n}{\left({o}{n}{l}{y}\ {d}{i}{s}{c}{r}{e}{t}{e}\ {m}{a}{t}{h}{s}\right)}={n}{\left({M}\right)}−{n}{\left({M}\cap{L}\right)}−{n}{\left({M}\cap{O}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\)

Similarly, number of students who take only Digital Logic course is : \(\displaystyle{n}{\left({o}{n}{l}{y}\ {d}{i}{g}{i}{t}{a}{l}\ {\log{{i}}}\ {c}{c}{o}{u}{r}{s}{e}\right)}={n}{\left({L}\right)}−{n}{\left({M}\cap{L}\right)}−{n}{\left({O}\cap{L}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\) Similarly, number of students who take only Object-Oriented Programming is: \(\displaystyle{n}{\left({o}{n}{l}{y}\ {O}{b}{j}{e}{c}{t}−{O}{r}{i}{e}{n}{t}{e}{d}\ {P}{r}{o}{g}{r}{a}{m}\min{g}\right)}={n}{\left({O}\right)}−{n}{\left({M}\cap{O}\right)}−{n}{\left({O}\cap{L}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\)

Step 3

Hence, we get:

\(\displaystyle{n}{\left({o}{n}{l}{y}\ {d}{i}{s}{c}{r}{e}{t}{e}{\ m}{a}{t}{h}{s}\right)}={n}{\left({M}\right)}−{n}{\left({M}\cap{L}\right)}−{n}{\left({M}\cap{O}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\) \(\displaystyle={64}−{28}−{26}+{14}\) \(\displaystyle={24}\)

\(\displaystyle{n}{\left({o}{n}{l}{y}\ {d}{i}{g}{i}{t}{a}{l}\ {\log{{i}}}\ {c}{o}{u}{r}{s}{e}\right)}={n}{\left({L}\right)}−{n}{\left({M}\cap{L}\right)}−{n}{\left({O}\cap{L}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\) \(\displaystyle={58}−{28}−{22}+{14}\) \(\displaystyle{22}\)

\(\displaystyle{n}{\left({o}{n}{l}{y}\ {d}{i}{g}{i}{t}{a}{l}\ {\log{{i}}}\ {c}{o}{u}{r}{s}{e}\right)}={n}{\left({L}\right)}-{n}{\left({M}\cap{L}\right)}-{n}{\left({O}\cap{L}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\) \(\displaystyle={58}-{28}-{22}+{14}\) \(\displaystyle={22}\)

\(\displaystyle{n}{\left({o}{n}{l}{y}\ {O}{b}{j}{e}{c}{t}-{O}{r}{i}{e}{n}{t}{e}{d}{\ P}{r}{o}{g}{r}{a}{m}\min{g}\right)}={n}{\left({O}\right)}-{n}{\left({M}\cap{O}\right)}-{n}{\left({O}\cap{L}\right)}+{n}{\left({M}\cap{O}\cap{L}\right)}\) \(\displaystyle={94}-{26}-{22}+{14}\) \(\displaystyle={60}\)

Hence, total number of students who took only one course are 24+22+60= 106

Answer: The total number of students who took only one course are 24+22+60= 106