Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fair_distributions_naive_imp <- function(k) {
- count <- 0
- iterations = 0
- for (n in 1:k) {
- for (m in n:k) {
- iterations = iterations + 1
- if (is_fair_distribution(n, m)) {
- count = count + 2
- break
- }
- }
- }
- count
- iterations
- }
- powers <- c(1, 2, 3, 4, 5,10)
- powers.low <- c(1, 2, 3, 4)
- for (p in powers){
- print(fair_distributions_naive_imp(10^p))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement