Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

computer simulation i need a C code to solve the next question using distributed random value A baker is trying to figure out how many

computer simulation
i need a C code to solve the next question using distributed random value

A baker is trying to figure out how many dozens of bagels to bake each day. Customers order a number of dozens bagels each. Bagels sell for 8.40 TL per dozen. They cost 5.80 TL. per dozen to make. All bagels not sold at the end of the day are sold at half price to a local grocery store.

Based on a long-run simulation, how many dozen (to the negrest dozen) bagels should be baked each day for given probability distributions p(r) and g(r) rethosenting the pmf for the number of customers per day, and the number of dozens cach customer buys? You are asked to assume one of the options given below

q.image text in transcribed
image text in transcribed
(b) p(n) and q(n) are given as p(n)={w0,10,n=11,12,,10otherwise,q(n)={55n,0.n=1,2,,10otherwise. If Return a randon value between . and 1. return ((double )/m ); 3 //o Function to generate exponentially distributed RVs using inverse eethod //= - Input: x (Gean value of distribution) I/o - Output: Returns with exponential RV double exponential(double x ) \{ double x; Unifore randon number from to 1 If Pull a uniforn RV (

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago