Numerical Analysis Laboratory 1 Soca Mirela 9491512

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Numerical Analysis

Laboratory 1

Soca Mirela 9491512

Task5

1.The code from part A was modified to use the calc_power function that calculates the power
through the 26 resistors. Also the random indexes values are between 1 and 26 and the
reordering for the R vector is updated for this number of resistors.

2. A better solution can be obtained if the value for T variable is made bigger, so that the while
loop runs longer and tries more combinations of random permutations, until T reaches the end
value.

3. Minimum power found was 0.011833 W,

with permutation R = [6 5 14 24 10 8 15 16 5 10 7 7 4 11 20 11 3 10 6 2 14
17 9 2 3 23]

You might also like