Среда, 24.04.2024, 03:24
Приветствую Вас Гость | RSS

 
 

Анти случайный математический сайт: всё Бесплатно 18+ kenokeno.ucoz.ru

Anti chaotically math site all FREE against losses против проигрышей 18+

 
Карта мира Пирамида Жизни Визуальная математика Всеобуч CoronaVirus

карта статистики посетителей & исследования и конкурсы бесплатные & ВКонтакте & Математический Блог & КеноКено & КЕНО ЮТЮБ KENO mini YOUTUBE

БЕЗ рекламы БЕЗ партнёрских БЕЗ рефералов NO advertising NO partners NO referrals pas de publicite pas de partenaires pas de references

Ссылки внутри страниц открываются в новой вкладке Links inside pages open in a new tab of browser

КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE КЕНО ЮТЮБ KENO mini YOUTUBE

Просвещение России содержит гигантский пробел:
интегралы в любом виде в младшей школе не изучаются

даже словами отличными от слова "интеграл": "сбор"
в то время как интеграл в жизни ежесекундно: и одежда
и продукты и выбор в магазине и транспортная задача

ведь понимая интегральную суть человек сравнивает
без расчётов в уме и делает оптимальный выбор

ключевые 27

свои чужие другие
актив пассив экономия
лидер ведомый жертва
жизнь машина язык
цель время контроль
услуга товар качество
экспорт эксплуатация технология
интеграл логарифм производная
элита антиэлита приоритет

 

keywords 27

ours aliens others
active passive saving
leader slave victim
life machine language
target time control
service goods quality
export exploitation technology
integral logarithm derivative
elite antielite priority

 

 

Россия видит мир из будущего

Russia looks world from future

Rossiya vidit mir iz buduschego

IQ бесплатно Яндекс.Метрика

всегда пишу только про себя и никогда никому ничего не рекомендую

i always write only about myself and anything to anyone never recommend

мен әрқашан тек өзіме жазамын және ешқашан ешкімге ештеңе ұсынбаймын

завжди пишу тільки про себе і ніколи нікому нічого не рекомендую

web.archive.org/web/20230602154543///kenokeno.ucoz.ru/publ/

ich schreibe immer nur über mich selbst und empfehle niemandem etwas

j'écris toujours seulement sur moi-même et je ne recommande

mi ĉiam skribas nur pri mi mem kaj neniam rekomendas ion al iu

siempre escribo solo para mí y nunca recomiendo nada a nadie

web.archive.org/web/20230602152617///kenokeno.ucoz.ru/load/

 

Главная | Регистрация | Вход

 
Главная » Статьи » Мои статьи

Интегральное Просвещение

Интегральное Просвещение

Изображения временно без комментариев и все могут придумать объяснение своё

Размер изображений малый

путь включает препятствия и почему движемся по выбранному пути
ответ включает интеграл шагов имеющих признаки количественные
время и качественные безопасность и удобство и преимущество
тогда выбирая на каждом шаге умножение количества и качества
получаем интеграл шагов оптимальных и возможны варианты
 

http://kenokeno.ucoz.ru/png/timerazn.png

[img]http://kenokeno.ucoz.ru/png/timerazn.png[/img]
 

http://kenokeno.ucoz.ru/png/perspekt.png

[img]http://kenokeno.ucoz.ru/png/perspekt.png[/img]

 

http://kenokeno.ucoz.ru/png/treugol.png

[img]http://kenokeno.ucoz.ru/png/treugol.png[/img]

 

http://kenokeno.ucoz.ru/png/trkplosh.png

[img]http://kenokeno.ucoz.ru/png/trkplosh.png[/img]

 

http://kenokeno.ucoz.ru/png/zadtrans.png

[img]http://kenokeno.ucoz.ru/png/zadtrans.png[/img]

 

http://kenokeno.ucoz.ru/png/qubline.png

[img]http://kenokeno.ucoz.ru/png/qubline.png[/img]

 

http://kenokeno.ucoz.ru/png/ekonom.png

[img]http://kenokeno.ucoz.ru/png/ekonom.png[/img]

 

http://kenokeno.ucoz.ru/png/qedugol.png

[img]http://kenokeno.ucoz.ru/png/qedugol.png[/img]

 

http://kenokeno.ucoz.ru/png/piramid.png

[img]http://kenokeno.ucoz.ru/png/piramid.png[/img]

http://kenokeno.ucoz.ru/gif/pirasun33.gif
[img]http://kenokeno.ucoz.ru/gif/pirasun33.gif[/img]

http://kenokeno.ucoz.ru/dng/yama.png
[img]http://kenokeno.ucoz.ru/dng/yama.png[/img]

 

http://kenokeno.ucoz.ru/png/nedelya.png

[img]http://kenokeno.ucoz.ru/png/nedelya.png[/img]



ИНТЕГРАЛ понятно школа просто детский сад Данилин INTEGRAL

 

ЛОГАРИФМ понятно школа просто детский сад Данилин LOGARITHM

 

КОМБИНАТОРИКА понятно школа просто детский сад Данилин COMBINATORY

Учу EXCEL за 6 минут
 

 

Game of EXCEL 6 minutes

Провести перпендикуляр к окружности
используя инструменты без размеров

Касательная и параллельная касательной внутри окружности рисуются
и на параллельной внутри ищется середина соединив 3 точки и построив параллельные
или циркулем и перпендикуляр пройдёт через очевидные 2 точки

Параллельная касательной с другой стороны окружности и соединяем

В точке построить окружность в 2 раза больше
до достижения обратной стороны исходной окружности и соединить точки

В точке построить ещё такую же окружность и в 1-й из новых 2-х точек
построить ещё окружность итого до 6 окружностей
из них 1 точка будет диаметрально и соединив получим перпендикуляр

 

 

Задачка про Землю: некто проехал 100 км на юг
далее некто проехал 100 км на восток
далее некто проехал 100 км на север
и как все поняли: некто оказался в той же точке откуда стартовал

Вопрос: из какой точки выехал некто?

Правильный ответ: 99% ответят НЕправильно
и точек бесконечное множество в южном полушарии

и решений бесконечное множество ... южных

 

Task about Earth: someone drove 100 km to south
then someone drove 100 km to east
then someone drove 100 km to north
& as everyone understood: someone turned out
to be at same point from where he started

Question: from what point did someone leave?

Correct answer: 99% will answer incorrectly
& there are an infinite number of points in southern hemisphere

& answers infinity to south

 

path includes obstacles & why we are moving along chosen path
answer includes an integral of steps that have quantitative signs
time & qualitative safety & convenience & advantage
then choosing multiplication of quantity & quality at each step
we get an integral of optimal steps & possible options

 

qbasic quickbasic qb64 мои темы
qb64phoenix.com/forum/forumdisplay.php?fid=7


Relief 3d multivariate parametric
qb64forum.alephc.xyz/index.php?topic=4398

Russian Circle Diagram
qb64forum.alephc.xyz/index.php?topic=4367

Shuffling Letters
qb64forum.alephc.xyz/index.php?topic=3982

Guess Number
qb64forum.alephc.xyz/index.php?topic=3999

Integral of letters: all combinations of letters of all words
qb64forum.alephc.xyz/index.php?topic=3106

Rebus of Letters
qb64forum.alephc.xyz/index.php?topic=2961

Running strings
qb64forum.alephc.xyz/index.php?topic=1724

Russian Sorting Halves Danilin
qb64forum.alephc.xyz/index.php?topic=702

 

qb64 интернет эмулятор развивает форум qb64forum.alephc.xyz
и там требуются цвета RGB и массивы точней указывать
и goto нет и пробелы важно соблюдать

boxgm.itch.io/qbjs

Circle Diagram

3D relief рельеф 3Д

qb64 internet emulator develops qb64forum.alephc.xyz
& RGB colors & arrays are there it is accurate to specify
& there is no goto & it is important to observe spaces

 

 

Парадокс ведущих и ведомых

Сообщения властей ведущих не важны и народу возможно не вникать
зато сообщения народа ведомого важнее и власти вникать обязаны

Власти точку зрения доказывать обязаны
зато народ доказывать ничего не обязан
что ускоряет получение информации властями от народа

Властям полезно читать форумы народа и внутри власти
вышестоящие ведущие обязаны слушать нижестоящих ведомых

Человек ведущий обязан слушать ведомых внимательнее
заодно получая больше информации на будущее бесплатно
и ведущий должен быть заинтересованным в обсуждении ведомыми

Организация высказывая своё мнение обязана доказывать
зато народ обращающийся доказывать ничего не должен

Практически организация сообщает мнение множества участников
поэтому требуется доверенности от народа
или доверенность от вышестоящих властей

Следствие: кто власть определяет понимание кому важнее слушать

Объяснение: депутаты и губернаторы и мэры и министры
99% говорят заученное зато простой народ говорит 99% новое
плюс нижестоящие превышают вышестоящих количественно
и информация нижестоящих новее

Ведущий мнение обосновывает
зато ведомый высказывает мнение недоказуемое

Визуализация: пирамида где слои горизонтальные
представляют качественное различие народа на сегодняшний день

Пример: губернатор и мэр
Информация от губернатора для мэра не важна
зато информация мэра для губернатора важнее
и интеграл информации от мэров городов дальновиднее

Пример: мэр и народ
Информация от мэра для народа не важна
зато информация народа для мэра важнее
и интеграл информации от народа дальновиднее

Парадокс: нижестоящие оказываются ведущими
зато вышестоящие оказываются ведомыми




Paradox of leaders & slaves

Messages of leading authorities are not important & people may not understand
but messages of led people are more important & authorities are obliged to understand

Authorities are obliged to prove their point of view
but people are not obliged to prove anything
what accelerates receipt of information by authorities from people

It is useful for authorities to read forums of people & within government
higher leaders are obliged to listen to lower wingmen

Person leading is obliged to listen to slaves more attentively
at same time getting more information for future for free
& leader should be interested in discussing slaves

An organization expressing its opinion is obliged to prove
but people who apply do not have to prove anything

Practically organization communicates opinion of many participants
therefore a power of attorney from people
or a power of attorney from higher authorities is required.

Consequence: who determines power of understanding who is more important to listen to

Explanation: deputies & governors & mayors & ministers
99% say memorized but common people say 99% new
plus lower ones exceed higher ones quantitatively
& information of lower ones is newer

Presenter justifies opinion
but slave expresses an unprovable opinion

Visualization: a pyramid where horizontal layers
represent qualitative difference of people today

Example: Governor & Mayor
Information from governor is not important for mayor
but mayor's information is more important for governor
& integral of information from mayors of cities is more far-sighted

Example: mayor & people
Information from mayor is not important for people
but information of people is more important for mayor
& integral of information from people is more far-sighted

Paradox: lower ones turn out to be leading
but higher ones turn out to be led
 



Учебники теории вероятностей важнейшие понятия не разъясняют
в чём убедитесь распознав и индексируя учебники ТВ поэтому
читая википедии давно пора составить упрощённый словарь

вероятность: возможность определённого события

математическое ожидание: средняя случайная величина

статистика: исследование массовой информации

мода: наиболее вероятное значение

медиана: наиболее частое значение

комбинация: вариант набора элементов данного множества

бинарность: 2-чность или двоичность

тернарность: 3-чность или троичность

среднеквадратическое отклонение: рассеивания случайных
относительно математического ожидания

дисперсия: рассеяние и отклонение от расчётной вероятности
и мера разброса значений случайной величины
относительно математического ожидания

нормальное распределение: волнообразная функция вероятности
где вероятные случаи в центе графика в большем количестве

плотность вероятности: сравнение вероятности в разных условиях
эманация: истечение распространение: выделение из более сложного

энтропия: превращение: мера необратимого рассеивания энергии
и мера необратимости процессов энергетической ценности теплоты
и мера неупорядоченности системы микро процессов

биномиальность: уменьшение следующего элемента в 2 раза
например количество подряд массива бинарных

надёжность: сохранение во времени значения параметров
и недопустимость отказов в работе

гарантия: обеспечение ответственности и уверенности
живучесть: выполнение функции в новых условиях

сингулярность: единственный особенный: бесконечность процесса или явления
перманентность: непрерывность во времени

трансцендентность: непознаваемость или выходящее за пределы
или вечное знание например время непознаваемо

первообразная для данной функции f функция F
производная которой равна f на области определения

взаимно простые числа: целые числа общих делителей кроме 1 не имеющие
или целые числа взаимно просты если их наибольший общий делитель 1.
Например: взаимно просты числа 14 и 25 зато 15 и 25 взаимно не просты

регрессия к среднему измерения случайной величины
находящиеся до и после экстремумов
неизменно стремятся к среднему значению всей выборки






textbooks of probability theory do not explain
most important concepts which you will see by recognizing & indexing TV textbooks so
reading wikipedia it's time to make a simplified dictionary

probability: possibility of a certain event

mathematical expectation: average random variable

statistics: mass media research

fashion: most likely value

median: most frequent value

combination: a variant of a set of elements of a given set

binary: 2-ity or binary

ternarity: 3rd or trinity

Standard deviation: scattering of random
regarding mathematical expectation

variance: scattering & deviation from calculated probability
& a measure of spread of values of a random variable
relative to mathematical expectation

normal distribution: a wave-like probability function
where there are more probable cases in center of graph

probability density: comparison of probability in different conditions
emanation: expiration propagation: isolation from a more complex

entropy: transformation: a measure of irreversible energy dissipation
& a measure of irreversibility of processes of energy value of heat
& a measure of disorder of system of micro processes

binomiality: reducing next element by 2 times
for example number of consecutive binary arrays

reliability: saving parameter values in time
& inadmissibility of failures in operation

guarantee: ensuring responsibility & confidence
survivability: performing a function in a new environment

singularity: only special: infinity of a process or phenomenon
permanence: continuity in time

transcendence: unknowability or transcending
or eternal knowledge e.g. time is unknowable

primitive for a given function f is a function F
whose derivative is equal to f on domain of definition

mutually prime numbers: integers with no common divisors other than 1
or integers are mutually simple if their greatest common divisor is 1.
For example: numbers 14 & 25 are mutually simple but 15 & 25 are not mutually simple

regression to mean measurements of a random variable
located before & after extremes
invariably tend to mean of entire sample

 

Набор вещей интегральный оптимальный
Set of things is integral optimal







 

 

Компилируем C# milliard.cs
копируем текст программы и вставляем в блокнот
и временно сохраняем на рабочий стол с названием
milliard.cs

в блокноте создаём новый текст 2 строчки

name.bat компиляция создаёт окно 20-го века

csc.exe /nologo name.cs
pause

name.bat компиляция создаёт окно 21-го века

csc.exe /target:winexe name.cs
pause



и временно сохраняем на рабочий стол с названием
milliardx.bat

переходим в каталог
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
где видим csc.exe и переносим 2 файла
milliardx.cs
milliardx.bat
и создаём ярлык каталога на рабочем столе

стартовав milliardx.bat
возникает информ окно и создаётся
малый быстрый независимый исполняемый
milliard.exe

Онлайн компилятор C# без qbasic без регистрации
сохраняет программы на годы

C# Миллиард угадывает 1 из 1'000'OOO'ooo rextester.com/DYVZM84267
за =log(10^9;2) за 30 ходов

using System; // milliardx.cs
namespace DANILIN { class Program
{ static void Main(string[] args)
{ Random rand = new Random();int t=0;
int h2=1234567890; int h1=0; int f=0; int a;
int comp = rand.Next(h2);
int human = rand.Next(h2);
while (f<1)
{ Console.WriteLine();
Console.Write("{0} {1} {2}", t, comp, human);
if(comp < human)
{ Console.Write(" MORE");
a=comp; comp=(comp+h2)/2; h1=a; }
else if(comp > human)
{ Console.Write(" less");
a=comp; comp=(h1+comp)/2; h2=a;}
else {Console.Write(" win by {0} steps", t);f=1;}
t++; }
Console.ReadKey();}}}

 

Python rextester.com/JUNBW90242

import random # milliardp.py 
h1=0; h2=10**16;t=0; f=0
c = random.randrange(0,h2) #comp
h = random.randrange(0,h2) #human
while f<1:
    print(t,c,h)
    if h<c:
        print('MORE')
        a=h
        h=int((h+h2)/2)
        h1=a
    elif h>c:
        print('less')
        a=h
        h=int((h1+h)/2)
        h2=a
    else:
        print('win by', t, 'steps')
        f=1
    t+=1

 

JavaScript JS Milliard rextester.com/PYYQS76244

<script>

h2=1000000000, h1=0, f=0, t=0, a=0 // Milliard.js
comp = Math.floor(Math.random() * h2)
human = Math.floor(Math.random() * h2)
while (f<1) 
{ document.write("<br/>" + t + " " + comp + " " + human)
if(comp < human)
    { document.write(" MORE") 
      a=comp; comp = Math.floor((comp+h2)/2); h1=a}
else if(comp > human)
    { document.write(" less") 
      a=comp; comp = Math.floor((h1+comp)/2); h2=a}
else { document.write(" win by " + t + " steps "); f=1}
t++}

</script>

 

 

 

Анимация компиляция Win7 Framework

Программа угадывающая 1 из тысяч на qbasic qb64 milliard


h1=0: h2=10^3: t=1: f=0: Randomize Timer ' milliardb.bas
human = Int(Rnd*h2) 'human
comp = Int(Rnd*h2) 'comp
While f < 1
Print t; "human ="; human; "     comp ="; comp;
If comp < human Then
Print " MORE": a=comp: comp=Int((comp+h2)/2): h1=a
  Else If human < comp Then
  Print " less": a=comp: comp=Int((h1+comp)/2): h2=a
    Else If human=comp Then
    Print " win by "; t; " steps": f=1
End If: End If: End If: t = t + 1
Wend: End

Результаты для диапазона от 1 до 100

1    40    11    MORE
2    40    55    less
3    40    33    MORE
4    40    44    less
5    40    38    MORE
6    40    41    less
7    40    39    MORE
8    40    40    win by 8 steps

rextester.com/WLS44231

import random #daMilliard.py RANDOMIZE TIMER ' milliardb.bas
h1=0; h2=10**16;t=0; f=0 # h1=0: h2=10^7: t=1: f=0
c = random.randrange(0,h2) #comp = INT(RND*h2) 'comp
h = random.randrange(0,h2) #human = INT(RND*h2) 'human
while f<1: # While f < 1
 print(t,c,h) # ? t; "human ="; human; " comp ="; comp;
 if h<c: # If comp < human Then
 print('БОЛЬШЕ') # PRINT "БОЛЬШЕ"
 a = h # a = comp
 h = int((h+h2)/2) # comp = INT((comp+h2)/2)
 h1 = a # h1 = a
 elif h>c: # Else If human < comp Then
 print('меньше') # PRINT "меньше"
 a = h # a = comp
 h = int((h1+h)/2) # comp = INT((h1+comp)/2)
 h2 = a # h2 = a
 else: # Else If human = comp Then
 print('угадано за ', t, ' шагов') # ? "угадано за "; t; " шагов"
 f=1 # f = 1
 t+=1 # End If: End If: End If: t = t+1

qbasic игра угадай число: 1 строка

1 If Russia = 0 Then Russia = 2222: Randomize Timer: num = Int(Rnd * 100) + 1: GoTo 1 Else If Russia <> 0 Then n = Int(Rnd * 100) + 1: If n < num Then Print n; num; "MORE": GoTo 1 Else If n > num Then Print n; num; "less": GoTo 1 Else If n = num Then Print n; num; "da": End Else GoTo 1 ' guessnumberb.bas 9-9-2019 DANILIN Russia 


qbasic version of "guess my number game" 1 line

c# игра угадай число: 1 строка

using System; using System.Text; namespace DANILIN { class Program { static void Main(string[] args) { Random rand = new Random(); int Russia = 0; int n = 1; int num = 0; while (n!=num) { if (Russia == 0) { Russia = 2222; num = rand.Next(10)+1; } else if (Russia != 0) {Console.Write("? "); n = rand.Next(10)+1; Console.Write(" {0} {1} ", num, n); } if (n < num) { Console.WriteLine("MORE"); } else if (n > num) { Console.WriteLine("less"); } else if (n == num) { Console.Write("da"); } } Console.ReadKey(); } } } // guessnumberx.cs 9-9-2019 DANILIN Russia 

rextester.com/XZGC82928
 

Алгоритмы: Rosetta Code или RosettaCode


c# version of "guess my number game" 1 line

qb64forum.alephc.xyz/index.php?topic=3999.0

rosettacode.org/wiki/Guess_the_number#QB64_2

rosettacode.org/wiki/Fibonacci_sequence#Fibonacci_from_Russia


Hi Lo without Secret Number?
qb64forum.alephc.xyz/index.php?topic=3120.30

другая часть про Программирование:
ВСЕОБУЧ Компьютер Интернет Ютюб lisp и Учим C# qbasic Excel
kenokeno.ucoz.ru/load/vseobuch/1-1-0-14

сборник сравнений программ на разных языках программирования
rosettacode.org/wiki/Category:C_sharp
rosettacode.org/wiki/Category:QB64

qb64phoenix.com/forum/forumdisplay.php?fid=7

 

 

- Профессор, помог ли вам в жизни интеграл?
- Конечно! Помню уронил ключи и достал, свернув проволоку как знак интеграла 

- Professor, did integral help you in your life?
- Of course! I remember I dropped keys and took them out, folding wire as an integral sign

- Professeur, vous avez aidé dans la vie intégrale?
- Bien sûr! Je me souviens avoir laissé tomber les clés et l'avoir sorti, enroulant le fil comme un signe de l'intégrale

- Professor, haben Sie Ihnen im Leben geholfen?
- natürlich! Ich erinnere mich, dass ich die Schlüssel fallen ließ und den Draht als Zeichen des Integrals herausbrachte
 

Питон Python и МЫ  smart-lab.ru/blog/copypaste/805898.php

 

Встраиваем Питон Python

сайт trinket.io ждём и откроется Python

программ несколько отклонил из-за случайных
зато включилось угадывание из миллиарда

слева кнопка 3 линии  и там Embed Iframe

<iframe src="https://trinket.io/embed/python/e0d27a00c6" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

встраивается на многие сайты
 

 

Рюкзак 0-1 & rosettacode & qbasic qb64 и МЫ

Классическая задача про рюкзак решается многими способами
оглавление: rosettacode.org/wiki/Knapsack_problem

Long read: rosettacode.org/wiki/Knapsack_problem/0-1

Темы и программы: Knapsack
qb64phoenix.com/forum/showthread.php?tid=463
qb64forum.alephc.xyz/index.php?topic=3091
Combinations Generator
qb64forum.alephc.xyz/index.php?topic=2999

Новейшая моя программа синтезирует все шифры 0 и 1
добавляя лишний регистр и 0 остаются слева в шифре 

Количество сравнений уменьшается с N! до 2^N
например N=5 N!=120 >> 2^N=32

Автоматически присваиваются случайные значения
количества и качества и получается интеграл стоимости
причём возможно и делить только любой человек не поймёт

Программа пишет в каталог qb64


Open "knapsack.txt" For Output As #1
N=7: L=5: a = 2^(N+1): Randomize Timer 'knapsack.bas DANILIN
Dim L(N), C(N), j(N), q(a), q$(a), d(a)

For m=a-1 To (a-1)/2 Step -1: g=m: Do ' sintez cifer
    q$(m)=LTrim$(Str$(g Mod 2))+q$(m)
    g=g\2: Loop Until g=0
    q$(m)=Mid$(q$(m), 2, Len(q$(m)))
Next

For i=1 To N: L(i)=Int(Rnd*3+1) ' lenght & cost
C(i)=10+Int(Rnd*9): Print #1, i, L(i), C(i): Next ' origin

For h=a-1 To (a-1)/2 Step -1
    For k=1 To N: j(k)=Val(Mid$(q$(h), k, 1)) ' from cifer
        q(h)=q(h)+L(k)*j(k)*C(k) ' 0 or 1
        d(h)=d(h)+L(k)*j(k)
    Next
    If d(h) <= L Then Print #1, d(h), q(h), q$(h)
Next

max=0: m=1
For i=1 To a: If d(i)<=L Then If q(i) > max Then max=q(i): m=i
Next
Print #1,: Print #1, d(m), q(m), q$(m): End




Knapsack 0-1 & rosettacode & qbasic qb64 & WE

Classic Knapsack problem is solved in many ways

Contents: rosettacode.org/wiki/Knapsack_problem
Long read: rosettacode.org/wiki/Knapsack_problem/0-1

Topics & long programs: Knapsack
qb64phoenix.com/forum/showthread.php?tid=463
qb64forum.alephc.xyz/index.php?topic=3091
Combinations Generator
qb64forum.alephc.xyz/index.php?topic=2999
 

csharpforums.net/threads/knapsack-0-1-c-binary-rosettacode-we.8108/

bytes.com/topic/c-sharp/insights/977375-knapsack-0-1-c-binary-rosettacode-we

bytes.com/topic/python/insights/978063-knapsack-0-1-python-binary-rosettacode-we

bytes.com/topic/c/insights/978293-knapsack-0-1-c-binary-we

bytes.com/topic/javascript/insights/978412-knapsack-0-1-javascript-binary-rosettacode-we

 

My newest program synthesizes all ciphers from 0 & 1
adding an extra register & 0 remain on left in cipher

Number of comparisons decreases from N! to 2^N
for example N=5 N!=120 >> 2^N=32

Random values origin are automatically assigned
quantity & quality & integral of value is obtained
& it is possible to divide only anyone will not understand

Program write results to qb64 directory



Main thing is very brief & clear to even all

Results is reduced manually:

 1             2             17
 2             2             14
 3             2             17
 4             1             11
 5             2             18
 6             3             14
 7             3             10

 5             73           1101000
 4             62           1100000
 5             79           1011000
 4             68           1010000
 2             28           0100000
 5             81           0011100 !!!
 3             45           0011000
 4             70           0010100
 5             76           0010010
 2             36           0000100

 5             81           0011100

Результат сокращён вручную

Главное очень кратко и понятно даже школьникам

 

Рюкзак 0-1 Питон Python KNAPSACK 0-1 DANILIN

n=5; N=n+1; G=5; a=2**N        # N=7: L=5: a = 2^(N+1): 'knapsack.bas DANILIN
L=[];C=[];e=[];j=[];q=[];s=[]  # Dim L(N), C(N), j(N), q(a), q$(a), d(a)
d=[];L=[1]*n;C=[1]*n;e=[1]*a   # KNAPSACK 0-1 DANILIN
j=[1]*n;q=[0]*a;s=[0]*a;d=[0]*a

from random import randint    # Randomize Timer
for i in range(0,n):          # For i=1 To N
    L[i]=randint(1,3)         # L(i)=Int(Rnd*3+1)
    C[i]=10+randint(1,9)      # C(i)=10+Int(Rnd*9)
    print(i+1,L[i],C[i])     # Print i, L(i), C(i): Next
print()

for h in range(a-1,(a-1)//2,-1):# For m=a-1 To (a-1)/2 Step -1: g=m: Do
    b=str(bin(h))             # q$(m)=LTrim$(Str$(g Mod 2))+q$(m): g=g\2: Loop Until g=0
    e[h]=b[3:len(b)]          # q$(m)=Mid$(q$(m), 2, Len(q$(m))): Next

    for k in range (n):         # For k=1 To N:
      j[k]=int(e[h][k])         # j(k)=Val(Mid$(q$(h), k, 1)) ' from chifer
      q[h]=q[h]+L[k]*j[k]*C[k]  # q(h)=q(h)+L(k)*j(k)*C(k) ' 0 or 1
      d[h]=d[h]+L[k]*j[k]       # d(h)=d(h)+L(k)*j(k): Next

    if d[h]<= G:                # If d(h) <= L Then
      print(e[h], G, d[h],q[h]) # Print #1, d(h), q(h), q$(h): Next
print()  

max=0; m=1                      # max=0: m=1:
for i in range(a):              # For i=1 To a
    if d[i]<=G and q[i]>max:    # If d(i)<=L Then If q(i) > max
        max=q[i]; m=i           # Then max=q(i): m=i: Next
print (d[m], q[m], e[m])        # Print #1,: Print #1, d(m), q(m), q$(m): End

 

C# KNAPSACK 0-1 DANILIN

rextester.com/OIALC94208

using System;using System.Text;        // KNAPSACK 0-1 DANILIN    
namespace Knapsack { class Program { static void Main()
   
{ int n=5; int G=5; int u=n+1; int a=Convert.ToInt32(Math.Pow(2,u));
int[] L = new int[n]; int[] C = new int[n]; int[] j = new int[n];
int[] q = new int[a]; int[] S = new int[a]; int[] d = new int[a];
int dec; int i; string[] e = new string[a];
int h; int k; int max; int m; Random rand = new Random();

for (i=0; i<n; i++)
{L[i]=1+rand.Next(3); C[i]=10+rand.Next(9);
Console.Write(i+1); Console.Write("   ");
Console.Write(L[i]); Console.Write("   ");
Console.Write(C[i]);Console.WriteLine();
} Console.WriteLine();
 
for (h = a-1; h>(a-1)/2; h--)
{ dec=h; while (dec > 0)
{ e[h] = dec % 2 + e[h]; dec/=2; }
if (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("  ");
 Console.Write(q[h]); Console.Write("  ");
 Console.WriteLine(e[h]);}
} Console.WriteLine();
 
max=0; m=1;
for (i=0; i<a; i++)
{ if (d[i]<=G && q[i]>max)
{ max=q[i]; m=i;}}
 
Console.Write(d[m]); Console.Write("  ");
Console.Write(q[m]); Console.Write("  ");
Console.WriteLine (e[m]);}
}}

 

C++ Knapsack Рюкзак 0-1 DANILIN

#include <iostream> // KNAPSACK 0-1 DANILIN
using namespace std; int main()
{ setlocale (LC_ALL, "RUS");
  srand(time(NULL)); // rextester.com/VCBSQ91995
  
{ int n=7; int G=5; int a=2; 
  int dec, i, h, k, max, m;
  for (i=0; i<n; i++) a=2*a; string e[a]; // 2^n
  int L[n], C[n], j[n], q[a], d[a]; 

cout << "#  Кол  Цена" << endl;
cout << "#  Amo Price" << endl << endl;
for (i=0; i<n; i++)
{ L[i]=1+(rand() % 3); C[i]=10+(rand() % 9); j[i]=0;
  cout << i+1 << "   " << L[i] << "   " << C[i] << endl;
}
for (i=0; i<a; i++) { q[i]=0; d[i]=0;}
cout << endl;

cout << "Мх Кол Ст-ть Шифр" << endl;
cout << "Mx Amo Price Chifer" << endl << endl;
for (h = a-1; h>(a-1)/2; h--)
  { dec=h; while (dec > 0)
      { string s(""); s += '0'+dec%2;  
        e[h] = s + e[h]; dec/=2;
      }
if (e[h] == "") {e[h] = "0";}
e[h]= e[h].substr(1, e[h].size()-1);

for (k=0; k<n; k++)
{ j[k] = atoi((char*)(e[h].substr(k,1)).c_str());
  q[h]=q[h]+L[k]*j[k]*C[k];
  d[h]=d[h]+L[k]*j[k];
}

if (d[h] <= G)
cout << G << "  " << d[h] << "  " << q[h] << "  " << e[h] << endl;
} cout << endl;

max=0; m=1;
for (i=0; i<a; i++)
{ if (d[i]<=G && q[i]>max){ max=q[i]; m=i;}
}
cout << "Мх Ст-ть Шифр" << endl;
cout << "Mx Price Cipher" << endl << endl;
cout << d[m] << "  " << q[m] << "  " << e[m] << endl << endl;}
system("pause");
}

 

C# KNAPSACK 0-1 DANILIN

using System;        // Knapsack C# binary DANILIN
using System.Text;    // rextester.com/YRFA61366
namespace Knapsack
{
class Knapsack 
    {
    static void Main()
        {
            int n = 7;
            int Inside = 5;
            int all=Convert.ToInt32(Math.Pow(2,(n+1)));
            int[] mass = new int[n];
            int[] cost = new int[n];
            int[] jack = new int[n];
            int[] quality = new int[all];
            int[] amount = new int[all];  
            int i;             // circle
            int k;             // circle
            int dec; 
            string[] bin = new string[all];
            int list;
            int max;
            int max_num;
            Random rand = new Random();

            for (i=0; i<n; i++)
            {
                mass[i]=1+rand.Next(3);
                cost[i]=10+rand.Next(9);
                Console.WriteLine("{0} {1} {2}", i+1, mass[i], cost[i]);
            }
            Console.WriteLine();

            for (list = all-1; list>(all-1)/2; list--)
            {
                dec=list;
                while (dec > 0)
                {
                    bin[list] = dec % 2 + bin[list]; // from 10 to 2
                    dec/=2;
                }
                if (bin[list] == "")
                {
                    bin[list] = "0";
                }
                bin[list]=bin[list].Substring(1,bin[list].Length-1);
                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 mass < Knapsack
                {
      Console.WriteLine("{0} {1} {2} {3}", Inside, amount[list], quality[list], bin[list]);
                }
            }
            Console.WriteLine();

            max=0;
            max_num=1;
            for (i=0; i < all; i++)
            {
                if (amount[i]<=Inside && quality[i]>max)
                {
                    max = quality[i]; max_num =i ;
                }
            }
            Console.WriteLine("{0} {1} {2}",amount[max_num],quality[max_num],bin[max_num]);
        }
    }
}

 

 

Этапы развития идеи улучшения работы

1. Приоритет
2. Единомышленники
3. Экономия
4. Заработок
5. Наработки

допустим создали всепоглощающую расчётную таблицу
считающую вдоль и поперёк с графиками
и с подсветкой результатов и с подсказками
оптимального решения и даже у меня такие таблицы есть

1. Приоритет = сначала заявляем своё авторство
и возможно за деньги в ФИПС и я получил 3 свидетельства
а возможно за бесплатно на форумах классно оформив

2. Единомышленники = ищем кто подскажет ошибки
или наоборот ошибки не выявят и все знают автора

3. Экономия = времени в своей работе ведь
оптимальные решения более дальновидные чем кажется

4. Заработок = способность выполнять больше работы
и давать быстрые правильные ответы с оформлением

5. Наработки = копии таблиц или расчётов или блоков
за годы позволяют жонглировать своими наработками
особенно возможно проиндексировать чертежи автокада DWG
для быстрейшего поиска за секунды в 2-х программах
 

 

Антилогарифм N: число логарифм которого
при основании a равен числу N
или число N антилогарифм числа а при log N = а

Антилогарифм N по основанию b числа a
равен b в степени a: N=b^a

Логарифм 2 по основанию e=2.718281828
Антилогарифм 7.39

Логарифм 8 по основанию 2
Антилогарифм 256


Antilogarithm N: number whose logarithm
at base a is equal to number N
or number N is antilogarithm of number a at log N = a

Antilogarithm N on base b of number a
is equal to b to power of a: N=b^a

Logarithm 2 based on e=2.718281828
Antilogarithm 7.39

Logarithm 8 on base 2
Antilogarithm 256

 

 

XONIX qbasic qb64 Ксоникс qb64phoenix.com/forum/showthread.php?tid=519

XonixPRO kenokeno.ucoz.ru/blog/xonix/2022-10-14-90

 

Визуальная математика: kenokeno.ucoz.ru/publ/vismath/1-1-0-7

 

 

Простые числа kenokeno.ucoz.ru/blog/prime/2022-11-08-95

 

Питон простые числа Python primes

Dim p As Long: f=0: j=2: q=0: t=Timer: ' p = 2^31-1:
Randomize Timer: p = int(rnd*2^25): s=p^0.5 ' PRIME_mult.bas russian DANILIN
While f < 1 ' PRIME_.bas russian DANILIN
    If j >= s Then f=2
    If p Mod j = 0 Then q=1: Print p, j, Int(p/j)
    j = j + 1
Wend
If q <> 1 Then Print p, " Prime", p/10^9, " BillionS"
Print p, Timer - t


C# простые числа C# primes


using System; using System.Text; // PRIME_mult.cs DANILIN
namespace prime // rextester.com/VBXFL2777
{ class Program
  { static void Main(string[] args)
    { var start = DateTime.Now; int f=0; int j=2; int q=0;
      Random rand = new Random(); // long p = 2147483648-1;
long p = rand.Next(Convert.ToInt32(Math.Pow(2, 22))-1);
long s = Convert.ToInt32(Math.Pow(p,0.5));
  while (f < 1)
      { if (j >= s)
          { f=2; }
if (p % j == 0)
{ q=1; Console.WriteLine("{0} {1} {2}",p,j,Convert.ToInt32(p/j));}
 j++;
 }
if (q != 1) { Console.WriteLine("Prime {0} BillionS", p); }
var finish = DateTime.Now;
Console.WriteLine(finish - start);
Console.ReadKey();
}}}

 

qbasic простые числа qb64 primes

import time; from random import randint # PRIME_mult.py russian DANILIN
p = randint(1, 2**25); s=int(p**0.5); f=0; j=2; q=0;    # p=2**31-1;
while f < 2:       # rextester.com/QFZD94890
    if j >= s:     # 2**31-1 = 2_147_483_647
        f=2        # max 2_308_621_829
    if p % j == 0:
        q=1
        print (p,j,int(p/j))
    j+=1
if q != 1:
    print(p," Prime", p/10**9, " BillionS")
print(time.perf_counter(), " seconds")

 

Задача про сундук и замки на компьютере не решаемая

А навесил на сундук свой замок А и выслал В
В получил сундук и навесил свой замок В
и отправил сундук А
А получил сундук и снял свой замок А
и отправил сундук В
В получил сундук и снял свой замок В

Вопрос: возможно ли подобная пересылка на компьютере?


Task about chest & locks on computer is not solvable

A his lock A on chest & sent it to B
B received chest & hung his lock B in
& sent chest to A
A received chest & removed his lock A
& sent chest to B
B received a chest & removed his lock B

Question: Is such a transfer possible on a computer?

 

 

 

Категория: Мои статьи | Добавил: DANILIN (01.02.2017)
Просмотров: 2908 | Рейтинг: 0.0/0
Всего комментариев: 0

Форма входа

Категории раздела

Поиск

Статистика


Онлайн всего: 1
Гостей: 1
Пользователей: 0
Карта мира

Данный сайт средством массовой информации не является.
Данный сайт: личный дневник, созданный в развлекательных целях.
Данный сайт азартные игры не пропагандирует и не организует.
Данный сайт ставки не принимает и выигрыши не выплачивает.
Данный сайт никакие платные услуги не предоставляет.

Сайт и автор за упущенную выгоду ответственность не несёт.
Сайт и автор за возможные убытки ответственность не несёт.

Файлы имеют цель: приоритет открытий, изобретений, формул и творчества
и тексты выражают субъективные оценочные суждения без упоминания имён.

На сайте никакие иностранные агенты не упоминаются.

Все тексты юридической силы не имеют и служить доказательством в суде не могут.
Все формулы возможно вывести самостоятельно и ответ автора сайта не нужен.
18+ web.archive.org/web/20230602152617///kenokeno.ucoz.ru/load/?page2

This site is not a media outlet.
This site: personal diary created for entertainment purposes.
This site promote does not and gambling not organize.
This site bets does not accept and winnings does not pay out.
This site any paid does services not provide.

Site and author for lost profits are not responsible.
Site and author for possible losses are not responsible.

Files have a target: priority of discoveries, inventions, formulas, and creativity
and texts express subjective value judgments without mentioning any names.

On this site none foreign agents don't mentioned.

All texts have no legal force and as evidence in court cannot serve.
All formulas can be deduced independently & response of site author is not required.
18+ web.archive.org/web/20230602154543///kenokeno.ucoz.ru/publ/?page2

Бесплатный конструктор сайтов - uCozЯндекс.Метрика