Compute the value of the mini max tree

Assignment Help Basic Computer Science
Reference no: EM131076377

Exercise 13 in Chapter 15 introduced the mini max tree. It has min nodes and max nodes. Part b of the exercise asked you to design a solution for representing and evaluating these trees. Implement your design in C++.

Chapter 15 Exercise 13:

Consider a nonempty binary tree with two types of nodes: min nodes and max nodes . Each node has an integer value initially associated with it. This tree is a mini max tree and has a value, which we define as follows:

• If the root is a min node, the value of the tree is equal to the minimum of

• The integer stored in the root

• The value of the left sub tree, but only if it is nonempty

• The value of the right sub tree, but only if it is nonempty

• If the root is a max node, the value of the tree is equal to the maximum of the above three values.

a. Compute the value of the mini max tree in Figure 15-21. Each node is labeled with its initial value.

b. Design a general solution for representing and evaluating these trees.

635_c5f1552e-5383-4ebe-b737-e128668134cb.png

Reference no: EM131076377

Questions Cloud

Changes in the supply of and demand for loanable funds : Interest rates in the United States have fallen in recent years. In terms of the loanable funds market, which combination of changes in the supply of and demand for loanable funds could best explain this?
Enhance training and development : Explain organizational learning techniques for today's HR professional s and how they enhance training and development. Within your essay, include the following: Describe competency models, case-based decision making, and systems thinking.
Is this decreasing-cost industry : A new production technology for making vitamins is invented by a college professor who decides not to patent it. Thus, it is available for anybody to copy and put into use. The TC per bottle for production up to 100,000 bottles per day is given in th..
Different types of human resource values : By now, from your textbook readings and lesson, you should have a firm grasp on the different types of human resource values and strategies that are commonplace in the workforce. From this information, build a mission statement for the human resou..
Compute the value of the mini max tree : Design a general solution for representing and evaluating these trees.
What information could you ask for that will help you : You have just one hour to gain a brief understanding of a company's current performance. What information could you ask for that will help you to have a quick understanding of the company's performance within a very short time?
A gamma distribution with parameters : b. Let Y = the lifetime measured in minutes. Derive the pdf of Y.If X has a gamma distribution with parameters a and b, what is the probability distribution of Y = cX?
Legislation that helps to manage retirement plans : Discuss some of the legislation that helps to manage retirement plans. What are some examples of laws that have been put into place to protect employees? What are these laws purposed to do?
The law of diminishing marginal utility states that : The law of diminishing marginal utility states that:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Problem regarding the binary calculations

Do the following binary calculations.

  Implement the stack and queue with a single class

Implement the stack and queue with a single class interfaces with a unique class that is derived from class LinkedDeque. i asked this question before. Please do not copy the answer. thanks

  How can a business use the internet

Select four Internet browsers and provide three positive and 3 negative features about each, summarize your findings.

  Explain different kinds of feasibility studies

When deciding whether to buy and implement digital dashboard or management cockpit sometimes a feasibility study is conducted.  Explain the different kinds of feasibility studies.

  Audience is the way ideas are organized and presented

Audience is the way ideas are organized and presented in a text

  Evaluate for risk management purposes

Choose three information assets that a typical organization has and evaluate for risk management purposes which vulnerability should be evaluated for additional controls first?

  What is the recommended overlap of wap coverage

What is the recommended overlap of WAP coverage and why?

  Finding content of ac and memory word at specified address

What are the content of the AC and the memory word at address 103 when the computer halts.

  Write a program in matlab and vb to ask

Write a program in Matlab and VB to ask the user the maximum error emax (e.g., 0.1, 0.01, 0.05, etc.), keep adding terms in S, until the following condition is satisfied: emax > |S - Sk| Print the minimum number of k to satisfy the above condition..

  Convert the following c program to mips program

Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already. 1) f = i + j + k +1; 2) f = i  -  2;

  Describe of what the computer considers true or false

For your initial post, provide your own description of what the computer considers "TRUE" and what the computer considers "FALSE." Then, provide at least two code examples (original examples) that would return TRUE

  Organization and develop an information security strategy

The task is to carry out an information security risk assessment for an organization and develop an Information Security Strategy for that organization. This should include, at least:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd