Finding integer numbers using basic operations

seezeey
Messages
1
Reaction score
0
Hello everyone!

I am trying to construct an algorithm for the following problem and was wondering if there is any existing body of knowledge on this. Please forgive me if this is inappropriate (or ridiculous) but I am totally foreign to number theory.

It goes like this:
You are given n integers and allowed to use four basic operations. You are also given another integer as the target. You are required to find the target using the given numbers.
The only rule is that you can use each number (given or derived) only once.

Is there an efficient algorithm to check if there exists a solution to any given instance of this problem?

For example:

given numbers: 1 2 3 4
target: 17

a valid solution would be (4 + 1) * 3 + 2 = 17
an invalid solution would be (4 + 4) * 2 + 1 = 17, since 4 is used twice.

My solution is practically a brute-force approach with pruning and it is subject to state-explosion.

Thanks in advance...

--seezeey
 
Physics news on Phys.org
You have a certain alphabet, n integers combined with at least one of four possible operation symbols. Then you have an evaluation function: the calculation of the expression. Thus we have a finite number of allowed words with a finite set of evaluation values. These can all be listed and then decided, whether a given number is among them.

As such an algorithm is completely useless from a scientific point of view, there probably won't be any approaches other than brute force.
 
Thread 'Determine whether ##125## is a unit in ##\mathbb{Z_471}##'
This is the question, I understand the concept, in ##\mathbb{Z_n}## an element is a is a unit if and only if gcd( a,n) =1. My understanding of backwards substitution, ... i have using Euclidean algorithm, ##471 = 3⋅121 + 108## ##121 = 1⋅108 + 13## ##108 =8⋅13+4## ##13=3⋅4+1## ##4=4⋅1+0## using back-substitution, ##1=13-3⋅4## ##=(121-1⋅108)-3(108-8⋅13)## ... ##= 121-(471-3⋅121)-3⋅471+9⋅121+24⋅121-24(471-3⋅121## ##=121-471+3⋅121-3⋅471+9⋅121+24⋅121-24⋅471+72⋅121##...
##\textbf{Exercise 10}:## I came across the following solution online: Questions: 1. When the author states in "that ring (not sure if he is referring to ##R## or ##R/\mathfrak{p}##, but I am guessing the later) ##x_n x_{n+1}=0## for all odd $n$ and ##x_{n+1}## is invertible, so that ##x_n=0##" 2. How does ##x_nx_{n+1}=0## implies that ##x_{n+1}## is invertible and ##x_n=0##. I mean if the quotient ring ##R/\mathfrak{p}## is an integral domain, and ##x_{n+1}## is invertible then...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...

Similar threads

Back
Top