Click here to Skip to main content
15,888,803 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Best fit polynomial curve to non-continuous data points Pin
Alan Balkany24-May-11 3:25
Alan Balkany24-May-11 3:25 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko24-May-11 3:41
Ian Shlasko24-May-11 3:41 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Alan Balkany24-May-11 3:43
Alan Balkany24-May-11 3:43 
GeneralRe: Best fit polynomial curve to non-continuous data points Pin
Ian Shlasko24-May-11 3:46
Ian Shlasko24-May-11 3:46 
QuestionShortes pass find + walls bypassing Pin
alikalik14-May-11 22:22
alikalik14-May-11 22:22 
AnswerRe: Shortes pass find + walls bypassing Pin
Luc Pattyn15-May-11 2:43
sitebuilderLuc Pattyn15-May-11 2:43 
AnswerRe: Shortes pass find + walls bypassing Pin
dasblinkenlight15-May-11 23:11
dasblinkenlight15-May-11 23:11 
NewsAckerman non-recursive function Pin
Raminnamiranian4-May-11 22:31
Raminnamiranian4-May-11 22:31 
This is the code of Ackermann Algorithm.


Private Function T(ByVal m As Double, ByVal n As Double) As Double
Dim s1 As New Stack
Dim s2 As New Stack
s1.Clear()
s2.Clear()
If m = 0 Then
GoTo point
Else
Back: While n<>0
s1.Push(m – 1)
n = n - 1
End While
m = m - 1
n = 1
GoTo Point
point: Select Case (m)
Case 0
If s1.Count = 0 Then
Return n + 1
Else
s2.Push(n + 1)
m = s1.Pop
n = s2.Pop
GoTo Point
End If
Case 1
If s1.Count = 0 Then
Return n + 2
Else
s2.Push(n + 2)
m = s1.Pop
n = s2.Pop
GoTo Point
End If
Case 2
If s1.Count = 0 Then
Return (2 * n) + 3
Else
s2.Push((2 * n) + 3)
m = s1.Pop
n = s2.Pop
GoTo Point
End If
Case 3
If s1.Count = 0 Then
Return 5 + (8 * ((2 ^ n) – 1))
Else
s2.Push(5 + (8 * ((2 ^ n) – 1)))
m = s1.Pop
n = s2.Pop
GoTo Point
End If
Case Else
GoTo Back
End Select
End If
End Function
GeneralRe: Ackerman non-recursive function Pin
Ravi Sant5-May-11 0:31
Ravi Sant5-May-11 0:31 
AnswerRe: Ackerman non-recursive function Pin
Luc Pattyn5-May-11 1:48
sitebuilderLuc Pattyn5-May-11 1:48 
GeneralRe: Ackerman non-recursive function Pin
Richard MacCutchan5-May-11 4:18
mveRichard MacCutchan5-May-11 4:18 
QuestionSearch Algorithm Pin
Cyclone_S16-Apr-11 8:22
Cyclone_S16-Apr-11 8:22 
QuestionRe: Search Algorithm Pin
bob1697216-Apr-11 9:28
bob1697216-Apr-11 9:28 
AnswerRe: Search Algorithm Pin
Cyclone_S16-Apr-11 13:10
Cyclone_S16-Apr-11 13:10 
GeneralRe: Search Algorithm Pin
bob1697216-Apr-11 17:52
bob1697216-Apr-11 17:52 
GeneralRe: Search Algorithm Pin
Cyclone_S20-Apr-11 9:58
Cyclone_S20-Apr-11 9:58 
GeneralRe: Search Algorithm Pin
bob1697220-Apr-11 18:06
bob1697220-Apr-11 18:06 
GeneralRe: Search Algorithm Pin
Cyclone_S21-Apr-11 14:45
Cyclone_S21-Apr-11 14:45 
GeneralRe: Search Algorithm Pin
Cyclone_S22-Apr-11 9:57
Cyclone_S22-Apr-11 9:57 
GeneralRe: Search Algorithm Pin
bob1697224-Apr-11 4:59
bob1697224-Apr-11 4:59 
GeneralRe: Search Algorithm Pin
Cyclone_S27-Apr-11 13:43
Cyclone_S27-Apr-11 13:43 
AnswerRe: Search Algorithm Pin
Luc Pattyn20-Apr-11 12:39
sitebuilderLuc Pattyn20-Apr-11 12:39 
AnswerRe: Search Algorithm Pin
AspDotNetDev20-Apr-11 13:12
protectorAspDotNetDev20-Apr-11 13:12 
GeneralRe: Search Algorithm Pin
Cyclone_S20-Apr-11 13:40
Cyclone_S20-Apr-11 13:40 
AnswerRe: Search Algorithm Pin
Stefan_Lang26-Apr-11 4:32
Stefan_Lang26-Apr-11 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.