There is a question on TeX - StackExchange that has no direct solution to the installation of the qtree - TeX Live package in Ubuntu. And I want to answer that in this post, then just drop the link of this article to the comment section of the said query. So here is what I did:
Problem: Three items are selected randomly from a manufacturing process. Each item is inspected and classified as Defective (D) or Non-defective (N). Determine the number of ways this selection can be done using the tree diagram.
Solution:
There are 8 ways this selection can be done.
Below is the \mathrm{\LaTeX} code of the above tree diagram,
I never tried, but I think the above method also works on recent versions of Ubuntu.
- Open the Ubuntu Dash, and search for Ubuntu Software Center;
- In the Software Center, search for qtree;
- Select the first entry (Humanities Packages), and click on More Info to confirm if qtree is indeed included in this item;
- Finally, click .
Problem: Three items are selected randomly from a manufacturing process. Each item is inspected and classified as Defective (D) or Non-defective (N). Determine the number of ways this selection can be done using the tree diagram.
Solution:
There are 8 ways this selection can be done.
Below is the \mathrm{\LaTeX} code of the above tree diagram,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\usepackage{qtree} | |
\begin{document} | |
\Tree [.{Number of Ways} | |
[.N [.N [.N [NNN ]] [.D [NND ]]] | |
[.D [.N [NDN ]] [.D [NDD ]]]] | |
[.D [.N [.N [DNN ]] [.D [DND ]]] | |
[.D [.N [DDN ]] [.D [DDD ]]]]] | |
\end{document} |