Equation with modulus

  • #26
35,442
11,882
A classical x-y-question. We wasted 25 posts discussing what your question could mean - and it turns out that it is not even your problem. It is your attempt to solve the problem, and it is unclear if that approach can work at all.
I wrote my equation to know if when the car cross the traffic light the traffic light is green or red.
From the problem website I guess 200 is the distance and 15 is the period. What do you expect from solutions to the equation? Note that just a few specific values of x will solve it, but a large range of speeds will work for a given traffic light.
 
  • #27
A classical x-y-question. We wasted 25 posts discussing what your question could mean - and it turns out that it is not even your problem. It is your attempt to solve the problem, and it is unclear if that approach can work at all.From the problem website I guess 200 is the distance and 15 is the period. What do you expect from solutions to the equation? Note that just a few specific values of x will solve it, but a large range of speeds will work for a given traffic light.
I thought that I can find the ideal speed with this equation where x is the speed :

$$ \frac{distance}{x duration} mod 2 = 0$$

distance is the distance from the start. Distance and duration are integers.
 
  • #28
35,442
11,882
Why mod 2 and then equals 0?
The highest speed allowed by a single traffic light would be "as fast as the car can go".
The lowest speed to still catch the first green light is distance/duration.
What is the fastest speed to catch the second green light?
What is the lowest speed to catch the second green light?
Can you construct allowed speed intervals from that?
 
  • #29
Why mod 2 and then equals 0?
The highest speed allowed by a single traffic light would be "as fast as the car can go".
The lowest speed to still catch the first green light is distance/duration.
What is the fastest speed to catch the second green light?
What is the lowest speed to catch the second green light?
Can you construct allowed speed intervals from that?

I want to do an interval. But I thought that I can find speeds for the interval with that. Mod 2 is here to know if the traffic light is green or red.
 
  • #30
35,442
11,882
Mod 2 is here to know if the traffic light is green or red.
How exactly do you expect this to work?
 

Related Threads on Equation with modulus

Replies
3
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
5
Views
8K
  • Last Post
Replies
9
Views
13K
  • Last Post
Replies
5
Views
8K
Replies
3
Views
2K
  • Last Post
Replies
3
Views
5K
  • Last Post
Replies
14
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
4
Views
8K
Top