Results 1 to 5 of 5

Math Help - i want help in problem

  1. #1
    Member
    Joined
    Jun 2010
    From
    Zewail University - Cairo - Egypt
    Posts
    136

    i want help in problem

    here is problem link :
    https://www.spoj.pl/problems/EMP/
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Aug 2010
    Posts
    16
    Whats the problem? What parts do you need help with in particular? The descriptive you are, tje better we can help.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jun 2010
    From
    Zewail University - Cairo - Egypt
    Posts
    136
    Quote Originally Posted by fireballs619 View Post
    Whats the problem? What parts do you need help with in particular? The descriptive you are, tje better we can help.
    i can't understand the problem
    and how can it will be solved
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,697
    Thanks
    1468
    First, if this problem is really of interest to you, it would have looked better, and perhaps encouraged more people to respond, if you had taken the trouble to type the problem in rather than just copying it to a file and requiring others to open the file. That's always a nuisance and always has the possiblity of opening a virus.

    You are told that, on a certain island, everyone either always tells the truth or always lies. Also you are told that if you ask people at the university on this island, they will always tell you the following two things, no matter which employee you ask:

    1. There are fewer than N employees who work more than me.
    2. At least M employees of the university have a larger salary than me

    You are asked to write a computer program that given the two values, N and M, will return the number of employees at the University.

    They they give the example of N and M both equaling 1 in which case, we are told, the program should return "2".

    That is, any employee at the University must respond either:
    1. There is less than 1 employee who works more than me. (I.e. there are NO employees who work more than me.)
    2. At least 1 employee of the university has a larger salary than me
    But remember that some employees always tell the truth and some always lie.

    So you would have to consider a number of possiblities. It is possible that all those who tell the truth will answer (1) and all those who lie will answer (2). Or the other way around. But you should also consider the possibility that some people who tell always tell the truth could answer (1) and some who always lie could answer (1). What would that mean?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Jun 2010
    From
    Zewail University - Cairo - Egypt
    Posts
    136
    Quote Originally Posted by HallsofIvy View Post
    First, if this problem is really of interest to you, it would have looked better, and perhaps encouraged more people to respond, if you had taken the trouble to type the problem in rather than just copying it to a file and requiring others to open the file. That's always a nuisance and always has the possiblity of opening a virus.

    You are told that, on a certain island, everyone either always tells the truth or always lies. Also you are told that if you ask people at the university on this island, they will always tell you the following two things, no matter which employee you ask:

    1. There are fewer than N employees who work more than me.
    2. At least M employees of the university have a larger salary than me

    You are asked to write a computer program that given the two values, N and M, will return the number of employees at the University.

    They they give the example of N and M both equaling 1 in which case, we are told, the program should return "2".

    That is, any employee at the University must respond either:
    1. There is less than 1 employee who works more than me. (I.e. there are NO employees who work more than me.)
    2. At least 1 employee of the university has a larger salary than me
    But remember that some employees always tell the truth and some always lie.

    So you would have to consider a number of possiblities. It is possible that all those who tell the truth will answer (1) and all those who lie will answer (2). Or the other way around. But you should also consider the possibility that some people who tell always tell the truth could answer (1) and some who always lie could answer (1). What would that mean?
    can u give me another example with numbers more than 1 so i would understand what u mean
    Follow Math Help Forum on Facebook and Google+

Search Tags


/mathhelpforum @mathhelpforum