Saturday, November 24, 2007

If everybody gets the same answer, it has to be right. Is it ? Part 2

Why I bothered to blog about this ? Reasons:
  1. In the school examinations, students are given back the examin papers. However, it is not the case for the PSLE (Primary School Leaving Examination. That means if the kids are given this type of questions, it is definitely not fair to those who spend the effort but mark it wrong. It is the examination committee's responsibility to ensure the correctness of the questions as well as the corresponding answers. In PSLE, every mark counts. That extra mark will determine whether you get selected to a particular secondary school of your choice. I hope whatever examination committee will take extra effort to ensure everything in the exam paper is in order
  2. I wanted to find out what kind of tolerance can we give with this type of exam question. Suppose we allow tolerance of ± 1 minor marking on the ruler and protractor, we will be talking about 6.9-7.1 for 7cm, 9.9-10.1 for 10cm, and 29.9-30.1 for 30°. With Sun Studio 12 from Sun Microsystems, you can write a program to work that out based on Interval Arithmetic. Instead of providing the exact value to the variable, you can give them a range. The output will be given in range too. Below shows the Fortran 95 code and result:
    $ cat a1.f95
    INTERVAL :: ANG = [29.9, 30.1]
    INTERVAL :: EF = [6.9, 7.1]
    INTERVAL :: FG = [9.9, 10.1]
    INTERVAL :: GW
    INTERVAL :: EW
    INTERVAL :: E
    INTERVAL :: F
    REAL :: PI = 3.14159265
    
    GW=FG*sin(ANG*PI/180)
    EW=FG*cos(ANG*PI/180)-EF
    ALPHA=atan(GW/EW)
    ANSWER=(PI-ALPHA)*180/PI
    
    PRINT *, ANSWER
    
    END
    
    $ f95 -xia -xarch=amd64 a1.f95
    
    $ ./a.out
     [106.1311886713034,110.60714019410637]
    

So the answer should be between 106 to 111, if we round it off to the nearest integer

Think about it. If everybody is doing the same thing, it has to be right. Is it ?

Labels:

0 Comments:

Post a Comment

<< Home