taking the help of the hall) - page 2

 
Richie: However, the progression formula is roughly obvious to the naked eye: Y = int(8.3069*e^(0.1825*x)+0.5).

This can go into the annals, too. Good.

Only I guess it's not "approximately obvious" (that's a big mouthful!), but "approximately obvious to the naked eye" :)

 

Of course you can. People don't understand jokes at all. I'll see you when you sober up to my condition :)

Here's another joke for you. The program works, but I wouldn't advise you to run it.

Private Sub Command1_Click()
Dim i1 As Integer
Dim i2 As Integer
Dim i3 As Integer
Dim i4 As Integer
Dim i5 As Integer
Dim i6 As Integer
Dim i7 As Integer
Dim i8 As Integer
Dim sum As Long
For i1 = 0 To 30
For i2 = 0 To 30
For i3 = 0 To 30
For i4 = 0 To 30
For i5 = 0 To 30
For i6 = 0 To 30
For i7 = 0 To 30
For i8 = 0 To 30
 sum = Chisla(i1) + Chisla(i2) + Chisla(i3) + Chisla(i4) + Chisla(i5) + Chisla(i6) + Chisla(i7) + Chisla(i8)
   If sum = Int(Val(Text1.Text)) Then
   Print i1; i2; i3; i4; i5; i6; i7; i8
   End If
Next i8
Next i7
Next i6
Next i5
Next i4
Next i3
Next i2
Next i1
End Sub


Private Function Chisla(Nomer As Integer)
If Nomer = 0 Then Chisla = 0
If Nomer = 1 Then Chisla = 10
If Nomer = 2 Then Chisla = 12
If Nomer = 3 Then Chisla = 14
If Nomer = 4 Then Chisla = 17
If Nomer = 5 Then Chisla = 21
If Nomer = 6 Then Chisla = 25
If Nomer = 7 Then Chisla = 30
If Nomer = 8 Then Chisla = 36
If Nomer = 9 Then Chisla = 43
If Nomer = 10 Then Chisla = 52
If Nomer = 11 Then Chisla = 62
If Nomer = 12 Then Chisla = 74
If Nomer = 13 Then Chisla = 89
If Nomer = 14 Then Chisla = 107
If Nomer = 15 Then Chisla = 128
If Nomer = 16 Then Chisla = 154
If Nomer = 17 Then Chisla = 185
If Nomer = 18 Then Chisla = 222
If Nomer = 19 Then Chisla = 266
If Nomer = 20 Then Chisla = 319
If Nomer = 21 Then Chisla = 383
If Nomer = 22 Then Chisla = 460
If Nomer = 23 Then Chisla = 552
If Nomer = 24 Then Chisla = 662
If Nomer = 25 Then Chisla = 795
If Nomer = 26 Then Chisla = 954
If Nomer = 27 Then Chisla = 1145
If Nomer = 28 Then Chisla = 1374
If Nomer = 29 Then Chisla = 1648
If Nomer = 30 Then Chisla = 1978
End Function
Put a button and a text box on the form. In the text box , enter H.
 
Richie:

Throw a button and a text box on the form. In the text box, enter H.


And in half an hour you get the result?
 

You could do an Excel solution search, although I'm not sure if that would work...

You could sketch a program that will search through the variants.

You can also use heavy mathematical programs.


What you need here is a program that would give you different values of a, b, c... with the same value of H.

There is rather no regularity in these numbers.

Don't forget that in addition to these numbers, which can equal a, there are also b,c,... variables which have their own values, and in general such variables 17 ))).

I tried it in Exxle but it's a brain bursting with cyclic, rank functions, etc. If anyone can do it, I'm jealous of them.

 

We can formulate the problem as an optimization problem:

Given a=(10, 12, 14, 17, 21, 25, 30, 36, 43, 52, 62, 74, 89, 107, 128, 154, 185, 222, 266, 319, 383, 460, 552, 662, 795, 954, 1145, 1374, 1648, 1978).

Find a second vector b, with coordinate values from the set {0,1} (and, of course, with the same number of coordinates, i.e. 30) - such that | a*b - H | -> min. The product of vectors is scalar. In Excel it is solved for sure with GA (addon "Search for solutions").

I do not know the deeper meaning of this problem. All variants in the worst case will be 2^30 ~ 10^9, i.e. in principle the problem is solvable for modern Pisuk.

 
timezero:

You could do an Excel solution search, although I'm not sure if that would work...

You could sketch a program that will search through the variants.

You can also use heavy mathematical programs.


What you need here is a program that would give you different values of a, b, c... with the same value of H.

There is rather no regularity in these numbers.

Don't forget that in addition to these numbers, which can equal a, there are also b,c,... variables that have their own values, and there are 17 of them.)

I tried it in Exxle, but it will break my brain with cyclic, rank functions, etc. If someone succeeds, I will be jealous of him.

Looked at, it seems to work.

Well, for example in a1 we'll look for a number,

b1,c1,d1... will be substituted with numbers, in b2-b17, c2-c17 the range of numbers we need.

In a1 the formula that will pick a number from the range by an index and add to the constraints of the range 2..17

 
And how do you describe this with a formula in excel ?
 
You can't calculate this in Excel. If there are 17 groups of 30 values, do you have any idea how many variations there might be? If you really need an answer, ask someone to write you a C program, look for a very powerful server, run it and wait. You'll get results in a couple of years.
 
Richie:

Of course you can. People don't understand jokes at all. I'll see you when you sober up to my condition :)

Here's another joke for you. The program works, but I advise you not to run it.

Throw a button and a text box on the form. In the text box, enter H.



Better to declare array with numbers and address by index, without if, it will work much faster. Better in mq4, it is 10 times faster than vb6, even better in mql5, it is even faster.

Chisla[]={10, 12, 14, 17, 21, 25, 30, 36, 43, 52, 62, 74, 89, 107, 128, 154, 185, 222, 266, 319, 383, 460, 552, 662, 795, 954, 1145, 1374, 1648, 1978};

 
Integer:


even better in mql5 - it is even faster.

Calculating for mql5 may take the whole of TC's conscious life)