Search results for query: *

  1. D

    Question Bubble sort

    Comparison of 7 bubble sorts with pictures in 2023 https://qb64phoenix.com/forum/showthread.php?tid=1540&page=2 Won "Russian sorting halves" whose implementation is in C# https://csharpforums.net/threads/russian-sorting-halves-danilin.4221/ 2 times faster according to report of American...
  2. D

    Resolved Falsification of probability

    Quantum random observe principles of binomial distribution
  3. D

    Xonix C#

    It is particularly unclear why programs overload computer starting from development environment and via bat
  4. D

    Xonix C#

    Window size via single variables: string helped strangely public int w=550, h=330; Added suddenly after Width = w; Height = h; inside its { } And later int n=13, a=w-40, b=h-40; I'll post a new version of Xonix program later in case something else changes My indentations style: Horstmann or...
  5. D

    Xonix C#

    ...int[] y = new int[n]; int[] dx = new int[n]; int[] dy = new int[n]; int[] c = new int[n]; for (int i=1; i<n; i++) { f[i] = (2+rand.Next(3))*5; c[i] = 1+rand.Next(3); x[i] = rand.Next(a); y[i] = rand.Next(b); dx[i] = rand.Next(5)-2; dy[i] = rand.Next(5)-3; } for (int k=1; k <700; k++)...
  6. D

    Number Guessing Game Beginner

    Topic from 2019? Answer Mar 28, 2019 with "goto" disabled https://csharpforums.net/threads/russian-sorting-halves-danilin.4221/#post-10188 and I created new version with While Computer guessing number from 0 to billion to 10^9 by logarithmic time by 30 steps using System; using System.Text...
  7. D

    Question Prime numbers and subtraction problem.

    line 12: if (p % j == 0 && f!=2) now: 2 is prime
  8. D

    Question Prime numbers and subtraction problem.

    Conversion to a integer: against design of form "5.0" Initially there were 3 states of flag f: ternary 0 = start & 1 = multiplier & 2 = prime so flag is an ordinary integer Now logic is: while flag f<1 reaches root we check whether root has been reached & then flag f=2 & exit q flag is...
  9. D

    Question Prime numbers and subtraction problem.

    Prime numbers are accelerated: root is removed from cycle and it is possible to count a prime number by counting such and such and it is found out: in range of up to 1 million numbers: 78 thousand primes using System; using System.Text; // PRIME_mult.cs DANILIN namespace prime //...
  10. D

    Knapsack 0-1 C# binary & rosettacode & WE

    my program from topic: 7 elements online rextester.com/YRFA61366 by excluding of condition //if (amount[list]<= Inside) // current mass < Knapsack we start and see column of solutions to avoid adding variables: I highlight and copy results & I paste it into notepad and Ctrl+G & I see 128...
  11. D

    Knapsack 0-1 C# binary & rosettacode & WE

    "you are trying to cut down the number of comparisons by hiding them into your vector multiplication of the array" absolutely everything is compared and only what is less than or equal to Knapsack is printed if (amount[list]<= Inside) // current mass < Knapsack { Console.WriteLine("{0}...
  12. D

    Knapsack 0-1 C# binary & rosettacode & WE

    I have it converted from binary to a number 0 or 1 in current calculation only 1 character jack[k]=Convert.ToInt32(bin[list].Substring(k,1)); corresponding to number of list item what is real to use even on paper by manually
  13. D

    Knapsack 0-1 C# binary & rosettacode & WE

    ...01 { jack[k]=Convert.ToInt32(bin[list].Substring(k,1)); quality[list]=quality[list]+mass[k]*jack[k]*cost[k]; // integral of costs amount[list]=amount[list]+mass[k]*jack[k]; // integral of mass }...
  14. D

    Knapsack 0-1 C# binary & rosettacode & WE

    ...for (k=0; k<n; k++) // inside 01 { jack[k]=Convert.ToInt32(bin[list].Substring(k,1)); quality[list]=quality[list]+mass[k]*jack[k]*cost[k]; // integral of costs amount[list]=amount[list]+mass[k]*jack[k]; // integral of mass } if (amount[list]<= Inside) // current...
  15. D

    Knapsack 0-1 C# binary & rosettacode & WE

    ..."0"; } e[h]=e[h].Substring(1,e[h].Length-1); for (k=0; k<n; k++) // inside 01 { j[k]=Convert.ToInt32(e[h].Substring(k,1)); q[h]=q[h]+L[k]*j[k]*C[k]; // integral of costs d[h]=d[h]+L[k]*j[k]; // integral of mass } if (d[h]<= G) // current mass < Knapsack {...
  16. D

    Knapsack 0-1 C# binary & rosettacode & WE

    ...(e[h] == "") {e[h] = "0";} e[h]=e[h].Substring(1,e[h].Length-1); for (k=0; k<n; k++) {j[k]=Convert.ToInt32(e[h].Substring(k,1)); q[h]=q[h]+L[k]*j[k]*C[k]; d[h]=d[h]+L[k]*j[k];} if (d[h]<= G) { Console.Write(G); Console.Write(" "); Console.Write(d[h]); Console.Write(" ")...
  17. D

    Resolved Falsification of probability

    Big C & P: winning Small c & p: losing Original Excel formula: =log(1-0,99)/log(1-0,25) =16 So after 16 zeros in a row for probability 0.25=25%=1/4 further reliability of 99% of one So letters are big or small: =log(1-C)/log(1-P) =log(c)/log(p) =log(0,01)/log(0,75) =16 C+(1-P)^N=1 C+p^N=1...
  18. D

    Resolved Falsification of probability

    Checking in Wolframalpha Reliability win and lose both probability of winning and losing create 4 combinations: C+p^N=1 (1-C)+p^N=1 C+(1-p)^N=1 (1-C)+(1-p)^N=1 Everything is interchangeable: C=1-c c=1-C P=1-p p=1-P Artificial intelligence of Wolframalpha knows logarithm: solve C+(1-p)^N=1...
  19. D

    Resolved Falsification of probability

    I'm testing idea: RNG trigonometric created a bad array that doesn't pass validation binary even\odd and small\large therefore, we shuffle equally real in Excel & basic & c# just using this bad array means: sequence is weak shuffled through a sequence of weak turns into a normal...
  20. D

    Resolved Falsification of probability

    I will study our programs on weak arrays but: more carefully: a = 15973 d = 37951 yes inverse sorted d and dependent a d = 13579 a = 31759 I'm testing the idea: RNG trigonometric created a bad array that doesn't pass validation binary even\odd and small\large therefore, we shuffle...
Back
Top Bottom