Question

1) Prove that if loga x = y, then lo8b x = (loga x)(logb a). Plot loga n for 1 S ns 100 when a 2, e and 10.(10-points) 2) Prove that (b) Ση-112-n(n+ 1 )(2n+ 1 )/6 k+1) (1-x) if X Hint: Induction - Discrete Math (15-points) 3) Consider two balanced dices with each of the six faces marked 1 to 6. In one single throw of these two dice, list all the possible outcomes. Compute the average value of the outcomes. (10-points) 4) Compute the size of the problem that can be solved on a machine that takes 10-12 sec/op in one day when T(n) = 4 n, 10 n, 2n . (10-points)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

As per the HomeworkLib policy on multiple questions, answer to first question is being given here:

(1)

Given:
log_ax=y Rightarrow x=a^y

To prove
log_bx=(log_ax)(log_ba) ;....(1)

let:
LHS = log_bx
and
RHS = (log_ax)(log_ba)

First, let us take LHS:

LH S = logbr
Using the given relation (1)
y logha

Now, let us take RHS:

RHS = (logaz)logy(1) (
Using the given relation (1)
RHS = (loga )(log a) = (logia )(logia) = (ylogia)(logia) = y logba (3)

From (2) and (3) we conclude that:
LHS=RHS and hence:
loger (logat.)(logia)

Now coming to the plot (This has been done using MATLAB, the script is also being given at the end for your reference)

Individual Plots for a=2,e and10

log,n,V n-1..100 0 10 20 40 60 70 80 90 100 log n,V n-1..100 10 20 70 80 100 log on,V n-1..100 10 1.5 0.5 10 20 60 70 80 100

Combined Plots for a=2,e and10

og2n logn l0910 0 10 20 30 40 50 60 70 80 90 100 n-1,2,3...100

MATLAB script for your reference:

%=================================

clear all;
clc;

% Given data
n = 1:100;
a2 = log2(n);
ae = log(n);
a10 = log10(n);

% Individual plots
figure
subplot(3,1,1)
plot(n,a2,'-+');
title('log_2{n}, orall n=1..100');
xlabel('n');
ylabel('log_2{n}');
subplot(3,1,2)
plot(n,ae,'-+');
title('log_e{n}, orall n=1..100');
xlabel('n');
ylabel('log_e{n}');
subplot(3,1,3)
plot(n,a10,'-+');
title('log_{10}{n}, orall n=1..100');
xlabel('n');
ylabel('log_{10}{n}');

% Combined plots
figure
plot(n,a2,'-+');
hold on
plot(n,ae,'-+');
hold on
plot(n,a10,'-+');
legend('log_2{n}','log_e{n}','log_{10}{n}');
xlabel('n=1,2,3...100');
ylabel('log_a{n}, orall a={2,e,10}');

%=================================

Add a comment
Know the answer?
Add Answer to:
1) Prove that if loga x = y, then lo8b x = (loga x)(logb a). Plot...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT