Domande taggate «probability-theory»

Sfide che coinvolgono le probabilità di calcolo per variabili casuali e processi stocastici.


3
Problema di compleanno generalizzato
Stasera, la mia fidanzata mi ha portato a cena fuori per festeggiare il mio compleanno. Mentre eravamo fuori, ho sentito Happy Birthday cantato da 5 diversi ospiti (incluso me stesso), in un ristorante pieno di 50 persone. Questo mi ha fatto pensare: il problema del compleanno originale (trovare la probabilità …




5
Traccia la distribuzione gaussiana in 3D
Nella teoria della probabilità, la distribuzione normale (o gaussiana) è una distribuzione di probabilità continua molto comune. Le distribuzioni normali sono importanti nelle statistiche e sono spesso utilizzate nelle scienze naturali e sociali per rappresentare variabili casuali con valori reali le cui distribuzioni non sono note. La sfida La tua …

6
Numeri che sono palindromi in N basi
Dato un numero intero non negativo n >= 0, genera per sempre la sequenza di numeri interi x_i >= 3che sono palindromi in nbasi esattamente diverse b, dove può essere la base 2 <= b <= x_i-2. Questo è fondamentalmente l'inverso di OEIS A126071 , dove vengono emessi gli indici …
10 code-golf  sequence  base-conversion  palindrome  code-golf  array-manipulation  matrix  code-golf  string  ascii-art  code-golf  ascii-art  physics  code-golf  number  sequence  fibonacci  code-golf  ascii-art  packing  code-golf  string  hexadecimal  code-challenge  restricted-source  decision-problem  binary  code-golf  code-golf  code-golf  stack-exchange-api  code-golf  string  parsing  generation  data-structures  code-golf  kolmogorov-complexity  graphical-output  code-golf  array-manipulation  integer  generation  data-structures  code-golf  number  random  probability-theory  king-of-the-hill  java  minesweeper  code-golf  string  kolmogorov-complexity  animation  code-golf  string  code-golf  code-golf  quine  code-golf  internet  code-golf  arithmetic  base-conversion 

11
"I" hanno "i" possibilità di verificarsi
Progettare un generatore di numeri casuali in cui l'i-esimo numero abbia il% di probabilità di verificarsi per tutti 0 <i <14. 0 dovrebbe avere esattamente il 9% di possibilità di verificarsi. Il seme per il generatore dovrebbe essere il tempo di sistema. Non è possibile utilizzare una funzione predefinita per …

2
Probabilità: quanto in alto puoi andare?
In precedenza avevo posto una domanda su come calcolare una probabilità in modo rapido e preciso. Tuttavia, evidentemente è stato troppo facile dato che è stata data una soluzione a forma chiusa! Ecco una versione più difficile. Questa attività riguarda la scrittura di codice per calcolare una probabilità esattamente e …

5
Calcola una probabilità esattamente e rapidamente
[Questa è una domanda del partner per calcolare esattamente una probabilità ] Questa attività riguarda la scrittura di codice per calcolare una probabilità esattamente e rapidamente . L'output dovrebbe essere una probabilità precisa scritta come una frazione nella sua forma più ridotta. Cioè non dovrebbe mai essere prodotto 4/8ma piuttosto …


7
Golf gli pseudoprimi!
Introduzione / Contesto In una recente discussione nella chat crittografica sono stato sfidato a discutere / aiutare con il test di primalità di Fermat e i numeri di Carmichael. Questo test si basa sulla premessa che a^(p-1) mod p==1sarà sempre valida per i numeri primi p, ma non sempre per …
9 code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

13
Espandi catene di confronto
A differenza di molti linguaggi, Python valuta a<b<cin quanto sarebbe stato fatto nel campo della matematica, in realtà a confronto i tre numeri, al contrario di confrontare il booleano a<ba c. Il modo corretto di scrivere questo in C (e molti altri) sarebbe a<b && b<c. In questa sfida, il …
9 code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

30
Dato un input int n, stampa n * invertito (n)
Dato un numero intero n, stampan * reversed(n) reversed(n)è il numero che ottieni quando hai reversele cifre di n. reverse(512) = 215 reverse(1) = 1 reverse(101) = 101 >>>>>>>> func(5) = 5*5 = 25 func(12) = 12*21 = 252 func(11) = 11*11 = 121 func(659) = 659*956 = 630004 Vince …
9 code-golf  math  arithmetic  code-golf  math  integer  code-golf  arithmetic  integer  code-golf  sequence  base-conversion  palindrome  code-golf  math  primes  integer  code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 


Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.