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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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