Consider the following function. What is the purpose of the function f? Please do explain and describe in details all possible answers for this function given below. int f(int n) { if ((a >= b) && (c < b)) return b;     else if (a >= b) return f(a, c, b);     else return f(b, a, c); } To find the maximum number between a, b, and c. To find the middle number between a, b, and c. To find the minimum number between a, b, and c. None of the other statements. Suppose the letters a,b,c,d,e,f have probabilities of 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. Which of the following is the Huffman code for the letter a,b,c,d,e,f? Please show how is the Huffman tree, so that you can determine one of the options below. 0, 10, 110, 1110, 11110, 11111 11, 10, 01, 001, 0001, 0000 11, 10, 011, 010, 001, 000 110, 100, 010, 000, 001, 111 An adjacency matrix of a graph is given below: matrix at photo First, draw the graph defined by that adjacency matrix, and label the vertices of the graph with 1, 2, 3, …, 6 so that vertex i corresponds to row and column i. Second, Give a coloring of the vertices (color the graph) that uses the minimum number of colors. Prove with explanations that your given coloring is the minimum coloring.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

ASSIGNMENT

 

  1. Consider the following function. What is the purpose of the function f? Please do explain and describe in details all possible answers for this function given below.

    int f(int n) {
    if ((a >= b) && (c < b)) return b;
        else if (a >= b) return f(a, c, b);
        else return f(b, a, c);
    }

    1. To find the maximum number between a, b, and c.
    2. To find the middle number between a, b, and c.
    3. To find the minimum number between a, b, and c.
    4. None of the other statements.

  2. Suppose the letters a,b,c,d,e,f have probabilities of 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. Which of the following is the Huffman code for the letter a,b,c,d,e,f? Please show how is the Huffman tree, so that you can determine one of the options below.

    1. 0, 10, 110, 1110, 11110, 11111
    2. 11, 10, 01, 001, 0001, 0000
    3. 11, 10, 011, 010, 001, 000
    4. 110, 100, 010, 000, 001, 111

  3. An adjacency matrix of a graph is given below: matrix at photo

    First, draw the graph defined by that adjacency matrix, and label the vertices of the graph with 1, 2, 3, …, 6 so that vertex i corresponds to row and column i.

    Second, Give a coloring of the vertices (color the graph) that uses the minimum number of colors. Prove with explanations that your given coloring is the minimum coloring.
0 1 1 1 01
10 0 1 1
1 0 0 1 1 1
1 1 0 1 0
0 1 1 1 0 1
1 1 10 1 0
Transcribed Image Text:0 1 1 1 01 10 0 1 1 1 0 0 1 1 1 1 1 0 1 0 0 1 1 1 0 1 1 1 10 1 0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY