Finding the variable of the equation?

  • Context: Undergrad 
  • Thread starter Thread starter sunmaungoo
  • Start date Start date
  • Tags Tags
    Variable
Click For Summary

Discussion Overview

The discussion revolves around the possibility of finding a variable, specifically 'b', in a mathematical equation involving a function f(x, y). Participants explore methods for solving this equation, including the use of root finding algorithms, while also delving into programming aspects related to the equation's implementation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about finding 'b' in the equation f(x, y) = result, where y = f(a, b), and expresses familiarity with the values of x, a, and result.
  • Another participant suggests using a root finding algorithm to approximate the value of 'b', noting that multiple solutions may exist depending on the function f.
  • A participant expresses unfamiliarity with root finding methods and seeks clarification on mathematical terms used in the discussion.
  • Further contributions involve a programming context where the equation is translated into code, raising questions about the algorithm's purpose and functionality.
  • One participant proposes treating strings as numbers in a specific base to facilitate understanding of the algorithm's mechanics.
  • Another participant mentions the algorithm's application in cryptography and its educational value for future projects.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to find 'b' or the specifics of the programming implementation. Multiple perspectives on the mathematical and programming aspects remain present.

Contextual Notes

Participants express varying levels of familiarity with mathematical methods and programming concepts, which may affect the clarity of the discussion. The relationship between the mathematical equation and its programming representation is not fully resolved.

Who May Find This Useful

Readers interested in mathematical problem-solving, programming algorithms, cryptography, or those seeking to understand the intersection of mathematics and computer science may find this discussion relevant.

sunmaungoo
Messages
5
Reaction score
0
I was just wondering if it is possible to find b in this equation?

f(x,y)=result.

where y=f(a,b).

so the I guess f(x,f(a,b))=result.

I know the actual value of x,a and result and it is possible to find b in the equation.

I also know the function of f().

Please ask me if this is the question is not clear and this is not a homework question.
 
Physics news on Phys.org
Hey sunmaungoo and welcome to the forums.

It should be possible to use what is known as a root finding algorithm to get an approximation at the very least for the value of b (possibly many solutions depending on the definition of f).

The idea is the same for example trying to solve x^7 + xSQRT(x) + e^-x + 34 = 0 where we need to find x: in these kinds of problems, we use a computer algorithm to get a good enough approximation.

Are you familiar with these kinds of methods?
 
unfortunately chiro,I am not familiar of these kind of methods.To be honest,I does not take math major.The exponent (e) is the exponent of 10,2 ? Thank for taking your time answering to this thread.
 
No worries: just post the function definition here and I will run through it with you.
 
It is actually a programming thing but I translated into the Mathematics so I don't know if it ok to post it here goes.I think this thread should be moved to a programming topic section.

Code:
string str="5YD6ZNFC"

bool result=(Method1(tempIntArray,Method1(temp2.ToArray(),str))==Method1(tempIntArray,text));

string Method1(int [] array,string text)
{
string result;

int num=0;

for(int i=0;i<text.Length;i++)
{
int num2=(int)(text[i]-'0');

num2=(num2+array[num] /new Int) * (array[num+1]/tempInt);

str+=num2.ToString();

num++;
}
if(num>array.Length-2)
{
num=0;
}

result=Method2(Method2(Method2(str)));

return result;
}

string Method2(string text)
{
int num=text.Length/2;

string text2=text.Substring(0,num);

string text3=text.Substring(num);

string text4;

int num2=0;

while(num2<text2.Length && num2 <text3.Length)
{
int num3=(int)(text2[num2]-'0');

int num4=(int)(text3[num2]-'0';

text4+=(num3+num4).ToString();
}
return text4;
}
 
Last edited:
When you deal with strings, the best way IMO to deal with this in general is to treat the string as a number in some base.

If you have a string and each character has b possibilities then you can write a string as number by using X = x0 + b*x1 + b^2*x2 + b^3*x3 + ... + b^n*xn.

Once you have this you can convert your computer code into a mathematical kind of relationship in which you can look at the problem in terms of using a root finding algorithm for the variables that are free.

It looks like your routine actually takes the string and converts it to a plain number (not in the same way I have done though) but it doesn't make sense because you have variables that I can't make sense of.

Can you explain in simple terms what your function actually does?
 
It has something to do with cryptography.I think it would be a best method to encode a sensitive message.I know there are a lot of better way to archive it but I particular want to know this algorithm because I wanted to treat it as a learning experience for my future complex development project.So basically it is for education purpose.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K