How Do You Calculate the Reflection of Numbers on a Board of Any Size?

In summary, the conversation discusses a board with 2 rows and 4 places, and the search for a general function that can provide the reflection or corresponding value for any given input number. The first question (a) involves finding a function for a half-divided card, while the second question (b) is about displacement. The solution for (a) involves using a specific equation with exceptions, while the solution for (b) is to subtract the input number from 5 and then add 4. Both solutions can be extended to any length row and column.
  • #1
xeon123
90
0
Hi,

I've this board, like shown in attachment, that has 2 rows. Each rows have 4 places. I'm trying to find a general function that gives me the reflection of the numbers.

I've 2 questions, so I put each question in a item.

a) Like shown in case a) of the attachment, If I write the number 1, my function must return the number 4. If I write the number 2, the function must return the number 3. If I write the number 5, must return the number 8, and if I write the number 7, it must return the number 6. And the opposite. If I write the number 4, I'll the number 1, etc...

As you can see, I've divided the card in half, and I'm trying to get the number that is on the opposition position of the card. I'm looking for a general equation, that answers me this for any row of any size. In this example, I've use a row with 4 position, but it could have been 7, 10, 15, etc...

Anyone can help me?

b) On the case b) it's a little different. I'm doing a kind of displacement. If I write the number 1, I'll get the number 3. If I write the number 2, I get the number 4, and the opposite. I'm also looking for a general function that returns me the correspondent value for any size of the row.

Any help?

Thanks,
 
Mathematics news on Phys.org
  • #2
Here is the attachment.
 

Attachments

  • reflection.pdf
    16.2 KB · Views: 230
  • #3
Here's your function for (a): {(1, 4), (2, 3), (4, 1), (3, 2), (5, 8), (6, 7), (8, 5), (7, 6)}.
 
  • #4
I was looking for an equation, and not a function full of constants.

Answer for a):
I think the answer for a) is

z=rowsize
f(x)=[itex]\underline{x/z}*z+(x\%z+3)\%z[/itex]

The [itex]\underline{}[/itex] means floor.

The only problem with this equation is that, when (x%z+3)%z == 0, it gives x-1. For this case I've to create an exception.

Ideally, I would like to find a general equation for all the cases, but it's not possible.

Still missing answer for b).
 
Last edited:
  • #5
The answer in the first row is 5-the input number:

Put in 1, get out 5-1=4
Put in 2, get out 5-2=3

For the second row its the same but the input numbers are 4 higher

Put in 5, minus 4=1, 5-1=4, plus 4=8
Put in 6, minus 4=2, 5-2=3, plus 4=7

This can be extended to any length row and column.
 
  • #6
Thanks superg33k , your answer is better.
 

FAQ: How Do You Calculate the Reflection of Numbers on a Board of Any Size?

What is the purpose of getting the reflection of numbers?

The purpose of getting the reflection of numbers is to understand the relationships between numbers and their mirror images. This can help in visualizing and solving mathematical problems, as well as understanding concepts like symmetry and patterns.

How do you calculate the reflection of a number?

The reflection of a number can be calculated by reversing the digits of the number and adding a negative sign in front of it. For example, the reflection of 123 would be -321.

What is the difference between a positive and a negative reflection?

A positive reflection is when the reflected number is greater than the original number, while a negative reflection is when the reflected number is less than the original number. This is because a positive reflection is a mirror image on the right side of the number line, while a negative reflection is a mirror image on the left side of the number line.

Can the reflection of a number be a decimal or fraction?

Yes, the reflection of a number can be a decimal or fraction. In this case, the digits after the decimal point or the numerator and denominator of the fraction will be reversed as well. For example, the reflection of 0.5 would be -0.5 and the reflection of 2/3 would be -3/2.

How is getting the reflection of numbers used in real life?

The concept of reflection of numbers is used in various real-life scenarios, such as in geometry and physics. In geometry, reflections are used to create symmetrical designs and patterns. In physics, the reflection of numbers is used to understand the behavior of waves and light, as well as in the study of mirror images and reflections.

Similar threads

Back
Top