You are on page 1of 2

Kuis Struktur Diskrit

Sifat: Open
Rabu, 24 November 2021 15:00 – 17:00 WIB

Instruksi:
1. Kuis dikerjakan dengan ditulis tangan.
2. Unggah jawaban kuis yang telah di foto/pindai dengan format NIM_Nama.pdf pada Ms. Teams.
3. Kerjakan soal-soal berikut. Saat pengerjaan soal boleh tidak berurutan.

Counting
1. An eight-bit word is called a byte. Find the number of bytes with their second bit 0 or the
third bit 1.

Graph
2. The distances between various cities are given in the table below.
Urbana Gotham Metropolis Bedrock Quahog
Urbana 1 2 3 3
Gotham 1 4 2 5
Metropolis 2 4 7 4
Bedrock 3 2 7 13
Quahog 3 5 4 13

a. Draw the corresponding graph to the table.


b. How many Hamiltonian cycles exist in the graph?
c. What cycle does the nearest-neighbour algorithm produce for the graph above? Then,
calculate the total distance!

3. Draw a planar representation for each graph if possible

Tree
4. A company plans to build a communications network connecting its five computer centers.
Any pair of these centers can be linked with a leased telephone line. Where vertices
represent computer centers, edges represent possible leased lines, and the weights on edges
are the monthly lease rates of the lines represented by the edges.

Use Prim’s and Kruskal’s algorithm to design a minimum-cost communications network


connecting all the computers represented by the graph below.
5. Make a Huffman tree for the alphabet {a, c, d, e, l, n, t, (, ), +} with the following frequency
table. Then, encode the word canteen.

You might also like