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

  A typical public telephone line using 4800 bps

The probability that a single bit will be in error on a typical public telephone line using 4800 bps modem is 10 to the power -3. If no error detection mechanism is used, the residual error rate for a communication line using 9-bit frames is approxim..

  Managing a large financial project

Your company has just hired a new CEO, and you make an appointment with her to discuss a large financial project that you have been managing.

  The role of the system analyst and how it impact goals

Research Paper: the role of the system analyst and how it impact goals and objective of the organization. This paper should a 10 page paper including references and content. It be written in an APA format.

  Determine the minimum force p and the associated angle

A roll of paper has a uniform weight of 0.75 lb and is suspended from the wire hanger so that it rests against the wall.

  Imagine and describe three general scenarios

Imagine and describe three general scenarios where network problems

  List the components of a typical operating system

List the components of a typical operating system and summarize the role of each in a single phrase.

  Is it designed for multiple situations

Is it designed for multiple situations?

  Complete a partially filled out expense report

Complete a partially filled out expense report for a company's sales force and then save it. To view these instructions while you work in Excel, you can print this page of instructions or move back and forth between this page and Excel by clicking..

  Give time line which identify specific steps of installation

Give a time line, which identifies specific steps (including training) and related resources required to implement the recommended system.

  Recognize the features of the internet that you require to

identify the features of the internet that you need to use in your mobile or home office including the followingwhich

  Examine and analyze the principles of polymorphism

Examine and analyze the principles of polymorphism, inheritance and encapsulation. Use the Library to get started on finding resources.

  Complete on your own project according to the instructions

Complete the On Your Own project (PC Only ) according to the project instructions and submit your assignment through the online course shell.

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