matematykaszkolna.pl
matematyka dyskretna dyskretny: Załózmy, ze ∑ = {e, p} i wyobrazmy sobie słownik zawierajacy wszystkie niepuste słowa z ∑* ułozone w zwykłym porzadku alfabetycznym. 1. Jak daleko musimy szukac w słowniku słów: ep, epp, pep, gdy słownik bedzie zawierał tylko te słowa z ∑*, których długosc jest nie wieksza od 4; 2. Jak daleko musimy szukac w słowniku słów: ppp, eeee, gdy słownik bedzie zawierał tylko te słowa z ∑*, których długosc jest nie wieksza od 7.
20 mar 14:37
Odpowiedzi na debilne pytania: zdefiniuj pojecie :"niepuste słowo"
20 mar 16:28
Trivial: http://ideone.com/bYszhP Słownik ≤ 4: ["e","ee","eee","eeee","eeep","eep","eepe","eepp","ep","epe","epee","epep"," epp","eppe","eppp","p","pe","pee","peee","peep","pep","pepe","pepp","pp","pp e","ppee","ppep","ppp","pppe","pppp"] Słownik ≤ 7: ["e","ee","eee","eeee","eeeee","eeeeee","eeeeeee","eeeeeep","eeeeep","eeeeep e","eeeeepp","eeeep","eeeepe","eeeepee","eeeepep","eeeepp","eeeeppe","eeeepp p","eeep","eeepe","eeepee","eeepeee","eeepeep","eeepep","eeepepe","eeepepp", "eeepp","eeeppe","eeeppee","eeeppep","eeeppp","eeepppe","eeepppp","eep","eep e","eepee","eepeee","eepeeee","eepeeep","eepeep","eepeepe","eepeepp","eepep" ,"eepepe","eepepee","eepepep","eepepp","eepeppe","eepeppp","eepp","eeppe","e eppee","eeppeee","eeppeep","eeppep","eeppepe","eeppepp","eeppp","eepppe","ee pppee","eepppep","eepppp","eeppppe","eeppppp","ep","epe","epee","epeee","epe eee","epeeeee","epeeeep","epeeep","epeeepe","epeeepp","epeep","epeepe","epee pee","epeepep","epeepp","epeeppe","epeeppp","epep","epepe","epepee","epepeee ","epepeep","epepep","epepepe","epepepp","epepp","epeppe","epeppee","epeppep ","epeppp","epepppe","epepppp","epp","eppe","eppee","eppeee","eppeeee","eppe eep","eppeep","eppeepe","eppeepp","eppep","eppepe","eppepee","eppepep","eppe pp","eppeppe","eppeppp","eppp","epppe","epppee","epppeee","epppeep","epppep" ,"epppepe","epppepp","epppp","eppppe","eppppee","eppppep","eppppp","epppppe" ,"epppppp","p","pe","pee","peee","peeee","peeeee","peeeeee","peeeeep","peeee p","peeeepe","peeeepp","peeep","peeepe","peeepee","peeepep","peeepp","peeepp e","peeeppp","peep","peepe","peepee","peepeee","peepeep","peepep","peepepe", "peepepp","peepp","peeppe","peeppee","peeppep","peeppp","peepppe","peepppp", "pep","pepe","pepee","pepeee","pepeeee","pepeeep","pepeep","pepeepe","pepeep p","pepep","pepepe","pepepee","pepepep","pepepp","pepeppe","pepeppp","pepp", "peppe","peppee","peppeee","peppeep","peppep","peppepe","peppepp","peppp","p epppe","pepppee","pepppep","pepppp","peppppe","peppppp","pp","ppe","ppee","p peee","ppeeee","ppeeeee","ppeeeep","ppeeep","ppeeepe","ppeeepp","ppeep","ppe epe","ppeepee","ppeepep","ppeepp","ppeeppe","ppeeppp","ppep","ppepe","ppepee ","ppepeee","ppepeep","ppepep","ppepepe","ppepepp","ppepp","ppeppe","ppeppee ","ppeppep","ppeppp","ppepppe","ppepppp","ppp","pppe","pppee","pppeee","pppe eee","pppeeep","pppeep","pppeepe","pppeepp","pppep","pppepe","pppepee","pppe pep","pppepp","pppeppe","pppeppp","pppp","ppppe","ppppee","ppppeee","ppppeep ","ppppep","ppppepe","ppppepp","ppppp","pppppe","pppppee","pppppep","pppppp" ,"ppppppe","ppppppp"] Proszę sobie policzyć
20 mar 20:15
Trivial: Można wyprowadzić wzór: f(k, ε) = 0 f(k, ex) = 1 + f(k−1, x) f(k, px) = 2k + f(k−1, x) Czyli np. dla długości słownika 4 i słowa pep mamy: f(4, pep) = 24 + f(3, ep) = 24 + 1 + f(2, p) = 24 + 1 + 22 + f(1, ε) = 24 + 1 + 22 + 0 = 21 A dla długości słownika 7 i słowa ppp mamy: f(7, ppp) = 27 + f(6, pp) = 27 + 26 + f(5, p) = 27 + 26 + 25 + f(4, ε) = 27 + 26 + 25 + 0 = 224
20 mar 21:20