Wednesday, May 13, 2020

Basic Problems (Level 2)

---------------------------------------------------------------------

Objective:
In this article, the objective is to realize the following points with the help of very simple problems
  1. Requirement of proper assumption,
  2. Iterative Algorithms (Loop Structure) 
  3. Observation of the behavior of the problem (Analysis) & selection of way of attacking to the problem.

Problem 03

Problem Statement: Find the a given number is even or odd.
Problem Analysis & Specifications:
  1. The number must be integer, let, iNum as input.
  2. The result may be assume to be
    1. 1, when iNum is Even and
    2. 0, when iNum is Odd
  3. So, the result is also integer, Let, iIsEven is the output.
Algorithm_03.01: Check_Even_Odd(iNum, iIsEven)
Steps:
1. iIsEven:= 1
2. IF ( (iNum%2) = 1 ) Then,
     iIsEven:= 0
   End of IF
3. Return

Now, make a small change in the specification 2, as,
The result may be assume to be
  0, when iNum is Even and
  1, when iNum is Odd.

Observe the following algorithm

Algorithm_03.02: Check_Even_Odd(iNum, iIsEven)
Steps:
1. iIsEven:= ( iNum % 2 )
2. Return

Now tell me,
Q1) Which algorithm is more efficient and why?
Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
Q3) Do you think, assumption matters in the way of writing a good algorithm?

So, try to remember,a
very small change in an assumption,
can solve a very big problem....
a very small change in an assumption,
can create a very big problem....

Now, we are going to observe such problem domain, where number of computations is not constant. Number of computations required will depend on the input value given.

 

Problem 04

Problem Statement: Find the highest digit in a given number.
Problem Analysis & Specifications:
  1. Number of comparisons required by this problem is defined by how much digits present in the number. So, multiple time computation of same code is required here. When this situation comes in the seen, we have two models to handle this kind of problems, 
    1. Iterative method or 
    2. Recursive method (will be discussed later) 
  2. The given number must be integer, let, iNum as input. 
  3. Lowest digit is 0 and highest digit is 9. So, this is the limited boundary of the result, which is an integer. Let, iMaxDigit is the output.

Algorithm_04.01: Check_Max_Digit(iNum, iMaxDigit)
Steps:
1. iMaxDigit:= 0 [ Initialization ]
2. Repeat the following sub operations while iNum > 0,
   2.1 New_Digit:= (iNum%10) [ Extracting one digit]
   2.2 IF ( New_Digit > iMaxDigit ) Then [ Is it greater ]
       2.2.1 iMaxDigit:= New_Digit [ Update ]
       End of IF
   2.3 iNum:= (iNum/10) [ Update ]
   End of the Step 2 Loop
3. Return

Now, the same algorithm, writing again, without any changes in the steps. Only, notation has been changed a little.

Algorithm_04.02: Check_Max_Digit(iNum, iMaxDigit)
Steps:
1. iMaxDigit:= 0                         [ Initialization ]
2. WHILE ( iNum > 0 )
     New_Digit:= (iNum%10)               [ Extracting one digit]
     IF ( New_Digit > iMaxDigit ) Then   [ Is it greater ]
       iMaxDigit:= New_Digit             [ Update ]
     End of IF
     iNum:= (iNum/10)                    [ Update ]
   End of WHILE
3. Return

Now, tell me
Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?

Ok, now consider iNum= 12345697. So, how the digits will be extracted from iNum? 7, 9, 6, 5, 4, 3, 2, 1. So, the changes in the iMaxDigit will be 0, 7, 9, the value 9 will remain unchanged after second iteration. So, what is the requirement of further iterations when solution is achieved? Remember, if solution found at any time, no need to perform further operations, it is non-sense to operate without requirement. So, the third version of the simple algorithm is given below:

Algorithm_04.03: Check_Max_Digit(iNum, iMaxDigit)
Steps:
1. iMaxDigit:= 0                              [ Initialization ]
2. WHILE ( iNum > 0 )
     New_Digit:= (iNum%10)               [ Extracting one digit]
     IF ( New_Digit = 9 ) Then                     [ Is Result ]
       iMaxDigit:= New_Digit                          [ Update ]
       Return
     ELSE IF ( New_Digit > iMaxDigit ) Then   
       iMaxDigit:= New_Digit                   [ Is it greater ]
     End of IF
     iNum:= (iNum/10)                                 [ Update ]
   End of WHILE
3. Return


Now, tell me
Q5) Which algorithm you will prefer to write your program?

Next, we will observe behavior of two very similar problems to select proper of way to attack the problem.
  1. Finding all factors of a number and
  2. Finding a number is Prime or not
Both, are based on the factors. 
Factor: A factor can simply defined as, an integer k is said to be a factor of N, if and only if (N/K) is an integer.
Prime: An integer N is said to be a prime number if and only if there are only factors {1, N}.

Observe:
Factors(100) = {1, 2, 4, 5, 10, 20, 25, 50, 100}
             = {1, 2, 4, 5, 10} U {10, 20, 25, 50, 100}

See both the set having same number of elements ! Is is surprising? No, it is the fact, factors always comes in pair. unable to understand why this two set. Ok, change the representation a little bit.
Factors(100) = {1, 2, 4, 5, 10} U {100, 50, 25, 20, 10}
                    Set                Set B

Still not getting any idea, Ok, look another representation
A      B      N
1  X  100  = 100
2  X  50   = 100
4  X  25   = 100
5  X  20   = 100
1010   = 100

Now, think what can be the upper limit required to perform,
  1. Find all Factors on N, for any N>=2.
  2. Check a given number N is prime or not, for any N>=2.
No, this is not a question to be answered now. Think it as a puzzle. Solve it.

In, our Computer Science & Engineering, we need to study behavior of the problem, i.e. the correlation among the values as well as distribution of the values. This defines the pattern of the problem.

As in medical science, it is believed that, that main reason for any decease/ any property is based on the sequence of DNA & RNA. Similarly, in our domain, it is also believed that, the sequence, i.e, correlation & distribution, defines a particular problem. So, if you can understand the mathematical properties of a problem, it will give you the solution to that problem.

Simply we says in our daily life, that,  

"know your enemy well to defeat them"

Do you think this statement is non-sense? I don't think.

But, I have a question.
What is way to know your enemy more?
In my opinion, probably, the best way is to spend more time with your enemy.

If you are ignoring your enemy, it is the fear, that, you may loose. It means, you surrendering without fighting. It means, neither you have the attitude to fight, nor, you believe yourself.

Only way to learn any subject- spend more time with it, which you feel hard to understand. Practice that more, where you are failing often.

There are so many problems, among them, I am selecting a very few interesting problems to give idea to you. you need to do lot of algorithms, after confidence will be visible.

If you didn't started writing programs related to algorithms we are discussing, start it. After a certain time, you will not be able to understand, if some programming facts are not get clarified. Time & Space(memory) are two important issues related with algorithm.

In the next article, some more complex patterns(of problem) will be discussed.

28 comments:

  1. Q1) Which algorithm is more efficient and why?
    ans: Algorithm_03.02 is more efficient. Because in Algorithm_03.01 first storing a value and then checking reminder will be 1/0 and changing the output which take more time. But in Algorithm_03.02 we calculating the result (reminder) and produce the output which take less time than the previous algorithm.

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    ans: Yes, the change in the algorithm_03.02 is really effective.

    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    ans: Yes, assumption matters in the way of writing a good algorithm.

    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    ans: Among Algorithm_04.01 & Algorithm_04.02, i would like to see structure of first algorithm (Algorithm_04.01) in the future articles. Because it is easy to understand.

    Q5) Which algorithm you will prefer to write your program?
    ans: I will prefer Algorithm_04.01 to write my program.

    I have read the content & realized.
    -Abhisek Midya, CMSA, Semester-2

    ReplyDelete
  2. ans1) Algorithm 03.02 is more efficient due to less operation..
    ans2) Yes, the change in algorithm_03.02 is really effective..
    ans3) Yes, assumption matters in the way of writing a good algorithm..
    ans4) among Algorithm_04.01 & Algorithm_04.02, Algorithm_04.02 is quite visible and easy to understand the operations..
    ans5) among Algorithm_04.01 , Algorithm_04.02 & among Algorithm_04.03 i will prefer for Algorithm_04.03.

    ReplyDelete
  3. Q1)Algorithm_03.02 is more effective because it will do the work in very few steps.
    Q2) Change is effective because we are getting the answer in one step only. We need to tell the user that what are the indication of 0 and 1.
    Q3) Obviously assumptions matters.
    Q4) Sir, I would prefer Algorithm_04.01 because here the nested steps are also numbered. As I open the article in mobile (in Desktop site), so here few steps go below than its original place so it becomes difficult to understand. There is no problem in your indentation but it would be helpful for me I suppose.
    Q5) I would prefer Algorithm_04.03 as it would end the program in few iteration.

    ReplyDelete
  4. Q1) Which algorithm is more efficient and why?
    Ans: According to me, Algorithm_03.02 is definitely much more effective than that of Algorithm_03.01. This is just because of the assumption which is made before writing or getting into the algorithm. In the Algorithm_03.02, no comparison is required like the one shown in Algorithm_03.01, due to this Algorithm_03.02 is much more effective as a result of less number of operations.

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    Ans: Obviously, the change made in Algorithm_03.02 is really effective. In the Algorithm_03.02, a simple 'Computation' has been done instead of a complex 'Comparison'. As a student of Computer Science we know that 'Comparison' operation itself is a complex operation and thus Algorithm_03.02 is much effective than Algorithm_03.01.

    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    Ans: Yes, assumption matters in the way of writing a good algorithm. From my point of view, assumption of a problem totally depends on how a person think. More you think, the better it will be.

    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    Ans: I liked both the structure but I would prefer the structure of Algorithm_04.02, due to it's simplicity.

    Q5) Which algorithm you will prefer to write your program?
    Ans: I will definitely prefer Algorithm_04.03 to write my program.

    Dwaipayan Bhoumick
    CMSA, Semester IV

    ReplyDelete
  5. Q1) Which algorithm is more efficient and why?
    Answer: Algorithm 3.02 is more efficient because efficiency is determined by the number of comparisons it takes to find the result.

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    Answer: It is effective because it gives an idea as to how a problem can be solved easily .
    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    Answer: yes, assumptions matter because it helps to understand the best solution for that particular problem.
    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    Answer: I will prefer algorithm 4.02 as it more precise and easy to understand.
    Q5) Which algorithm you will prefer to write your program?
    Answer: I will prefer algorithm 4.02

    Aqsaa Nasir (CMSA,semester 4)

    ReplyDelete
  6. Q1) Which algorithm is more efficient and why?
    Ans: Algorithm_03.02 is more efficient as we don't have to use if condition and thus no of steps used are also less.

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    Ans: Yes it is effective as we don't have to use if condition.

    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    Ans: Yes, in the above case we have seen how it helps us to write a good algorithm.

    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    Ans: I prefer the structure of Algorithm_04.02 for the proper alignment and proper spacing between the steps and the comments.

    Q5) Which algorithm you will prefer to write your program?
    Ans: I will prefer Algorithm_04.03 for writing a program as here an important checking has been done (i.e once the result is obtained we don't have to continue with the rest of the numbers).

    Sayan Poddar, CMSA, Semester-4


    ReplyDelete
  7. Q1) Which algorithm is more efficient and why?
    Answer: Algorithm_03.02 is more efficient because it reduces the number of steps compared to Algorithm_03.01. Moreover if we call this algorithm(Algorithm_03.01) in the main or in other fuction and we want to display a suitable message whether the number is odd or even then we have to put another if condition to check iIsEven is zero or one..so in total we have to put two if condition in that scenario and if look in the algorithm Algorithm_03.02, here in such scenario by one if condition we can get our desired output.

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    Answer: Yes, ofcourse the change in the algorithm_03.02 is really effective and the reason is also answered in the previous question(above).

    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    Answer: It depends on the individuals. What type of assumption we are making… how much it is effective,etc.

    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    Answer: Among Algorithm_04.01 & Algorithm_04.02, I will choose the structure of Algorithm_04.02 and would like to see in the future articles.
    The reason is, in Algorithm_04.02, the alignment is well maintained and also I’m quite familier with this type of algorithm structure since my 2nd semester.

    Q5) Which algorithm you will prefer to write your program?
    Answer: I would choose Algorithm_04.03. This algorithm is more effective.

    - Sayan Deb Roy, CMSA, SEM-4 .

    ReplyDelete
  8. 1) Algorithm_03.02 is more efficient than the other. Because this
    algorithm saves time to calculate the same problem and produces
    the same result.

    2) I think the changes in this Algorithm_03.02 is effective.

    3) Yes, I think so.

    4) I would like to see the structure of Algorithm_04.02 in future
    articles. I think this kind of structure makes me understood the
    process of execution better than the other one.

    5) I will prefer the Algorithm_04.03 for my program.

    - ATISH SARKAR, CMSA, SEM-II.

    ReplyDelete
  9. I read the article and I understand the requirement of proper assumption.

    Q1. I think Algorithm_03.02 is efficient enough cause, the algorithm use the results of the computation in it's proper way. it utilizes the values.

    Q2. it is very much effective. In Algorithm_03.01 there is comparison operation but in Algorithm_03.02 there is no need to comparison, as we use the remainder, this is a very good changes.

    Q3. Yes, Assumption plays a good role to writing a good program, It is proved in the above algorithm.

    Q4. Among Algorithm_04.01 & Algorithm_04.02 I will prefer the 2nd algorithm as it is helpful to write a program from it. the structure is quite similar to a c program, that's why I would like to see the structure in futures article.

    Debasis Das, CMSA, SEM -IV, Syamaprasad College

    ReplyDelete

  10. Q1.Algorithm_03.02 is more efficient.

    Q2.The algorithm_03.02 is really effective because it saves more time.

    Q3.Yes, i think assumption matters in the Way of writing a good algorithm.

    Q4. Among Algorithm_04.01 & Algorithm_04.02, i would like to see Algorithm_04.02 in the future articles.
    Because it is easier to understand.

    Q5) I will prefer Algorithm_04.03 to write my program.


    -Ahin Subhra Halder ,CMSA,SEM 2

    ReplyDelete
  11. Q1) Algorithm_03.02 is more effective as it take less operation than Algorithm_03.01 and also takes least amount of time for execution.

    Q2) Yes,the change in the algorithm_03.02 is effective.

    Q3) Yes, assumption matters in the way of writing a good algorithm.

    Q4)The structure of Algorithm_04.02 is good because it is properly aligned and unambiguous.
    Q5) I prefer the Algorithm_04.03 because it stops the loop whenever the search is successful. So, it saves time and hence time complexity also decreases.

    Priya Singh, CMSA, Semester-4.

    ReplyDelete
  12. 1)The Algorithm_03.01 is much effective,as both the program have same output but the second one have less steps ,it takes less time to write.
    2)Yes,it is effective it reduces the size of code and execution time as well as compared to the first algorithm.
    3) Yes, assumption matters a lot to write an algorithm as assumption allow us to focus on all the possibilities and restrictions that may occur while writing an algorithm.
    4)Among Algorithm_04.01 & Algorithm_04.02,I would like to see the structure of Algorithm_04.02 in future article as it is more like programming language c,hence it can be easily implemented and understood by me.
    5)I would prefer Algorithm_04.03 as it is much better than others as it doesn't allow useless iteration to occur when the highest one digit value (9) is already achieved.
    -Sony Pathak,CMSA,Semester-IV

    ReplyDelete
  13. Answers to the questions :
    1) Algorithm_03.02 is more efficient according to me, because it is easy to interpret and takes lesser steps reducing memory consumption.
    2)The change in the Algorithm_03.02 is definitely worthy.
    3) Assumption surely matters here.
    4) I'd personally like the structure of Algorithm_04.02, cause I'm more accustomed to it
    5)Algorithm_04.03 concludes all the possibilities, so I'd like to incorporate it in my program.

    -Shukrity Chakraborty,CMSA,Sem-IV

    ReplyDelete
  14. Q1. Algorithm_03.02 is more efficient for me since without wasting any line of codes the desired result is obtained and also giving the exact modulus value when the number is even which everyone can easily understand. I am truly amaized, since I never imagined in checking of even and odd number in this technique.

    Q2. I think that the change in Algorithm_03.02 is really effective.

    Q3. I think that assumption really matters in the way of writing a good algorithm.

    Q4. I would like to see the structure of Algorithm_04.02 in the future articles because it is reducing the effort of my eye to understand what the algorithm wants to promote. It is based on a precised, perfect aligned structure with proper indentation and less but effective words.

    Q5. I will prefer to write Algorithm_04.03 since I don't want to make use of useless iterations and make my code complex.

    -Sreemita Dey, CMSA, SEMESTER-4

    ReplyDelete
  15. Q1) Which algorithm is more efficient and why?

    Ans: I think, the Algorithm_03.02 is more efficient as after doing some changes in assumption we get the correct result and we don't have to perform any checking.


    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?

    Ans: Yes, it is really effective as we can avoid an additional checking.

    Q3) Do you think, assumption matters in the way of writing a good algorithm?

    Ans: Yes. The above two algorithms are the supporting examples. And the lines also...
    a very small change in an assumption,
    can solve a very big problem....
    a very small change in an assumption,
    can create a very big problem....


    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?

    Ans: In future articles, I would like to see the structure of Algorithm_04.02 because we are writing programs in C. As, this structure is like similar to it.


    Q5) Which algorithm you will prefer to write your program?

    Ans: I will prefer Algorithm_04.03 to write my program.

    - Anojit Ghosh, CMSA, Semester-2.

    ReplyDelete
    Replies
    1. I was waiting for the appearance of this comment...

      Sir, I have a question,
      why are you including "i" in the beginning of the variable(input/output) names?

      Delete
    2. "Factors(100) = {1, 2, 4, 5, 10, 20, 25, 50, 100}
      = {1, 2, 4, 5, 10} U {10, 20, 25, 50, 100}..."

      Sir, in this two sub-sets(A & B), why only 10 is common in the both A & B? Why not the other ones?

      Delete
  16. Answers to the questions :-
    Answer to question 1 :-
    In my opinion Algorithm_03.01 is more effective because it works more easily as iIsEven is set to 1 and it has to only check the odd number so it has only one checking condition but in the next algorithm it does not have any check condition but it will take more time than the previous because first dividing then storing and in first algorithm time is shortened as the process may be long but fast.

    Answer to question 2 :-
    I think change in the algorithm may be effective because of small size but also ineffective because of time consuming.

    Answer to question 3 :-
    Yes, assumption is very important to write a algorithm because it both helps and also creates a good algorithm.

    Answer to question 4 :-
    It is a very good and intelligent question, I like Algorithm_04.02 because it is very easy to understand than the previous one.

    Answer to question 5:-
    I preferred Algorithm_04.02 because it is short and easy to understand.

    I read it and I understand it. - Aditya Kumar Singh, CMSA, SEM- 2

    ReplyDelete
  17. Q1) Algorithm 03.02 is more efficient beacuse of less code and easy to access.

    Q2) I think the change in the algorithm_03.02 is really effective.

    Q3) yes, assumption matters in the way of writing a good algorithm.

    Q4) Algorithm_04.02 structure I would like to see in the future articles among Algorithm_04.01 and Algorithm_04.02 .
    Beacuse of proper "Indentation" make it more visible as well as attractive for the reader.

    Q5) I will prefer algorithm_04.03 to write my program against problem 4.

    - Bijoy Sarkar, CMSA, semister-II

    ReplyDelete
  18. Q1) Which algorithm is more efficient and why
    answer-> Algorithm_03.02 is more effective

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    answer-> effective

    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    answer-> yes

    4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    answer-> Algorithm_04.2


    Q5) Which algorithm you will prefer to write your program?
    answer-> Algorithm_04.03

    -Vivek kumar ydav , CSMA , semester-4 .

    ReplyDelete
  19. Ans 01:Algorithm_03.02 is more efficient than previous algorithm.Because ,in this algorithm proper operation is faster than other algorithm.
    Ans 02:yes,i think the change in the algorithm_03.02 is really
    effective.
    Ans 03: yes,i think assumption matters in the way of writing a good algorithm.
    Ans 04:I would like to see Algorithm_04.02 in the future articles.Because it is very easy to understand the proper operation.
    Ans 05:I would like to use Algorithm_04.02 to implement my programcode.

    ReplyDelete
  20. I have seen the above article and understand it.- Ritwik Banerjee,CMSA,SEM-2
    Problem-3
    1)Algorithm_03.02 is more effective than 03.01,because in here,we don't have to write the extra if loop of step 2 from the previous algorithm.Also this algorithm is easy to understand and write.

    2)Yes,i think it is really effective.

    3)Yes, assumption matters a lot.

    Problem-4
    4)I like Algorithm_04.02 structure.As,it is somewhat similar to the actual c programming codes.

    5) I will prefer Algorithm_04.03 for writing in my program.

    ReplyDelete
  21. 1) Which algorithm is more efficient and why?
    Ans) Algorithm 3.02 is more efficient because it is simple and understandable.

    Q2) Do you think that, the change in the algorithm_03.02 is really effective or worthless?
    Ans) Yes,it is effective because it gives us the concept of how the problem is solved.

    Q3) Do you think, assumption matters in the way of writing a good algorithm?
    Ans) Yes, assumptions does matter in writing am algorithm because it helps us to understand.

    Q4) Among Algorithm_04.01 & Algorithm_04.02, which structure you would like to see in the future articles? Also state why you like this structure?
    Ans) 4.02 as this algorithm is well defined and its structure is easily understandable.

    Q5) Which algorithm you will prefer to write your program?
    Ans) I will prefer algorithm 4.02

    Md Mahboob Ali,CMSA,semester-4

    ReplyDelete
  22. 1) Algorithm_03.02 is more efficient because it is easy for understanding.

    2) The change in the algorithm_03.02 is really effective.

    3) Assumption always matters in the way of writing a good algorithm.

    4) Among Algorithm_04.01 & Algorithm_04.02,I like to see Algorithm_04.02 in the future articles because it's structure is good.

    5)At last I will prefer Algorithm_04.03 to write the program 04.

    ReplyDelete
  23. 1.'Algorithm_03.02' is more efficient because the program has to go through less instruction,hence making the computation quick.
    2.Change in the 'Algorithm_03.02' is really effective.
    3.Yes, assumption matters in the way of writing a good algorithm.
    4.The structure of 'Algorithm_04.02' is better because it can be easily related with the program.
    5.'Algorithm_04.03' should be preferred because it is more precise.

    Abhisekh Kumar Giri- Sem II(CMSA)

    ReplyDelete
  24. 1). Algorithm_3.02 is more effective than Algorithm_3.01 because 3.02 use less space and is less complex than 3.01 , therefore making 3.02 faster than 3.01.

    2). The change in Algorithm_3.02 is really effective.

    3).Yes , Assumption plays an important role in writing a good algorithm.

    4). The structure of Algorithm_04.01 is much more preferable than other because in this structure it is very easy to trace and understand which operation is working under which one.

    5).I will prefer to write my program on the Algorithm_04.03 .

    - Sayan Neogy , CMSA , Semester-IV .

    ReplyDelete
  25. 1)Algorithm_03.02 is more efficient because
    it is more conceptual and easy to understand.
    2)Yes the changes in Algorithm_03.02 is effective.
    3)Yes assumption matters in writting an good algorithm.
    4)I would like to see the structure made in Algoritnm_04.02 in futher articles because it is more effective than the previous one.
    5)After going through all the algorithms i would like to prefer Algorithm_04.03.
    -Shawan Paul ,CMSA, SEMESTER-2.

    ReplyDelete
  26. Sir,
    Iam Ashwani kumar
    here is my answer
    ques 03 1)which algorithm is more efficient and why?

    ans- 03.02 algorithm is more easy and take less iteration as 03.01.

    ques 03 2) Do you think that the change is really effective or worthless?

    ans- Yes change in 03.02 is effective because it just directly give some output as 0 for even and 1 for odd which must first to know.

    ques 03 3) Do you think that assumption matters in the way of writing a good algorithm?

    ans- Yes assumption is required for write a algorithm properly and make it practical implementation.

    ques 04 4) Among algorithm 04.01 and 04.02 which structure you would like to see in the future articles? Also state why you like this structure?

    ans- As algorithm 04.02 is easy to implement and less complex.

    ques 04 5) Which algorithm you will prefer to write your program?

    ans- Algorithm 04.02 is more likely to use as easy to understand.

    ReplyDelete