[{"data":1,"prerenderedAt":1139},["ShallowReactive",2],{"$fHcjfv0SxmxWlWV4L7S49WFQuctIuQgRGEUWjsWlkMsg":3,"$fMMUdSFktwQFqMVGPrTtt3EC5yheBp7PzwIqznamFcMo":69,"$fc0LoAJgqXDLbKKd2JS_NpM4SuzBK8EycUXINSg09CKU":72,"$fM3ea55k6lKMPOTM84llDB26VSQDVVbxiQuSBFQw9P_c":77,"$f1Prj1xEczHja_-L7FyIGgRHd5_cSWHo7r6AE5aheAik":423,"$fI5fDmvm-5tr9wcH0eHaKZa1j3y_FQIQaHHPqbZxAHJE":645,"mdc-sdswtd-key":665,"mdc-1d-key":677,"mdc-4eig-key":685,"mdc-4qrk-key":693,"mdc-48dw-key":701,"mdc-cgrwv1-key":709,"mdc--ikqgue-key":717,"mdc-yeu48c-key":750,"mdc--v4qe6z-key":784,"mdc--oeg689-key":792,"mdc-5njpyw-key":1080,"mdc-sq1h5-key":1106,"mdc--4fd2ao-key":1131},{"content":4,"quizQuestionContent":40,"type":59,"pageMeta":60},[5,9,13,16,20,24,27,31,34,37],{"id":6,"value":7,"isTypeH1":8},"1865","Вероятность совпадения пола среди трёх людей",true,{"id":10,"value":11,"anchor":12,"isTypeH2":8},"4241","Теория: принцип Дирихле","pigeonhole-principle-theory",{"id":14,"value":15,"isTypeParagraph":8},"9775","Принцип Дирихле (его также называют принципом «ящиков и шаров») формулируется так: если объектов больше, чем категорий, то какая-то категория получит минимум два объекта.\n\nПрименение к задаче:\n- Категории (ящики): 2 пола (М и Ж).\n- Объекты (шары): 3 человека.\n\nПри распределении 3 людей по 2 категориям неизбежно найдутся минимум двое, попавшие в одну и ту же категорию (то есть одного пола). Следовательно, событие «хотя бы двое одного пола» происходит всегда, а вероятность равна 1.",{"id":17,"description":18,"titleAlert":19,"isTypeAlertWarning":8},"654","Если постановка задачи меняется (например, вводится больше двух категорий или другая модель определения пола), то и ответ может измениться; в стандартной школьной постановке с двумя полами ответ остаётся равным 1.",null,{"id":21,"value":22,"anchor":23,"isTypeH2":8},"4242","Решение через исходы","solution-by-sample-space",{"id":25,"value":26,"isTypeParagraph":8},"9776","Чтобы увидеть это «в лоб», удобно перечислить все возможные комбинации полов трёх людей, считая, что каждый может быть М или Ж.\n\nКоличество исходов: \\(2^3 = 8\\).\n\n| № | Исход (по порядку людей) | «Хотя бы двое одного пола»? | Объяснение |\n|---|---------------------------|------------------------------|------------|\n| 1 | МММ | Да | Трое мужчин |\n| 2 | ММЖ | Да | Двое мужчин |\n| 3 | МЖМ | Да | Двое мужчин |\n| 4 | ЖММ | Да | Двое мужчин |\n| 5 | ЖЖЖ | Да | Трое женщин |\n| 6 | ЖЖМ | Да | Двое женщин |\n| 7 | ЖМЖ | Да | Двое женщин |\n| 8 | МЖЖ | Да | Двое женщин |\n\nВо всех 8 случаях условие выполняется, значит вероятность равна \\(8/8 = 1\\).\n\nДополнительный способ (через противоположное событие):\n- Искомое событие: A = «хотя бы двое одного пола».\n- Противоположное событие: \\(\\overline{A}\\) = «все трое разных полов».\n- При двух полах событие «все трое разных полов» невозможно, значит \\(P(\\overline{A}) = 0\\).\n- Тогда \\(P(A) = 1 - 0 = 1\\).\n\nСхема (идея «ящиков и шаров»):\n- Ящики: [М], [Ж]\n- Шары: человек1, человек2, человек3\nТри шара не могут разложиться по двум ящикам так, чтобы в каждом ящике было не больше одного шара.",{"id":28,"value":29,"anchor":30,"isTypeH2":8},"4243","Проверка моделированием (JavaScript)","js-simulation-check",{"id":32,"value":33,"isTypeParagraph":8},"9777","Моделирование (Монте‑Карло) не является строгим доказательством, но хорошо показывает, что частота успеха стремится к 1.\n\n```\nfunction trial() {\n  // 0 = М, 1 = Ж\n  const a = Math.random() \u003C 0.5 ? 0 : 1\n  const b = Math.random() \u003C 0.5 ? 0 : 1\n  const c = Math.random() \u003C 0.5 ? 0 : 1\n\n  // событие \"хотя бы двое одного пола\"\n  return (a === b) || (a === c) || (b === c)\n}\n\nfunction simulate(N = 1_000_000) {\n  let ok = 0\n  for (let i = 0; i \u003C N; i++) {\n    if (trial()) ok++\n  }\n  return ok / N\n}\n\nconsole.log(simulate())\n```\n\nОжидаемый результат: число очень близкое к 1 (иногда будет выводиться ровно 1 из‑за того, что событие всегда истинно при данной логике проверки).",{"id":35,"description":36,"titleAlert":19,"isTypeAlertInfo":8},"597","Даже если в симуляции изменить вероятность рождения/появления мужчин и женщин с `0.5` на любое другое значение (например, `0.6/0.4`), ответ всё равно останется 1, потому что совпадение следует из количества категорий, а не из конкретных вероятностей.",{"id":38,"value":39,"isTypeParagraph":8},"9778","Итого: при двух возможных полах среди любых трёх людей совпадение пола у хотя бы двух неизбежно, поэтому вероятность равна 1 (вариант 1).",{"id":41,"options":42,"hint":56,"solution":57,"description":58},"1111",[43,46,50,53],{"id":44,"label":45,"isCorrect":8},"4572","1",{"id":47,"label":48,"isCorrect":49},"4573","3/4",false,{"id":51,"label":52,"isCorrect":49},"4574","7/8",{"id":54,"label":55,"isCorrect":49},"4575","1/2","Достаточно представить 2 «ящика» (М и Ж) и 3 «шара» (три человека): при раскладывании 3 шаров по 2 ящикам хотя бы один ящик получит минимум 2 шара, то есть найдутся хотя бы двое одного пола.","**Правильный ответ: 1** - `1` хотя бы двое одного пола будут всегда.  \n\nНеверные варианты:\n2. 3/4 — это типичный ответ для задачи про 2 детей: «хотя бы один мальчик», но здесь людей трое.\n3. 7/8 — выглядит как «1 − 1/8», но «1/8» здесь не является вероятностью отсутствия совпадений (такого события вообще не бывает при 2 полах).\n4. 1/2 — относится к другим формулировкам (например, «вероятность, что ровно двое одного пола» при равновероятных исходах).\n\nВ этой задаче результат равен 1 не потому, что «так получилось при 50/50», а потому что при двух возможных полах событие «хотя бы двое одного пола» является неизбежным (детерминированным) фактом для любых трёх людей.","В комнате три человека. Какова вероятность того, что хотя бы двое из них одного пола? То есть два и более. ","quizQuestion",{"title":7,"description":61,"ogTitle":7,"ogDescription":61,"ogImageUrl":62,"canonical":19,"ogLocale":63,"ogSiteName":64,"ogImageType":65,"ogImageWidth":66,"ogImageHeight":67,"ogType":68,"ogUrl":19},"Перечисление исходов, правило дополнения и принцип Дирихле; почему вероятность равна 1 и какие ошибки встречаются.","/og-image.png","ru_RU","goodwebjob.ru","image_jpeg","1200","630","article",{"siteName":70,"siteUrl":71},"GOOD WEB JOB!","https://goodwebjob.ru",[73],{"label":74,"slug":75,"to":76},"Подготовка к тех.интервью","technical-interview","/technical-interview/where-to-begin",{"navigationList":78,"navigationSublist":86},[79,82],{"path":76,"isActive":49,"name":80,"icon":81,"isNavbarMobileDisabled":8},"С чего начать?","material-symbols:visibility-outline-rounded",{"path":83,"isActive":8,"name":84,"icon":85,"isNavbarMobileDisabled":49},"/technical-interview/tasks","Сборник задач","material-symbols:task-outline",[87,96,123,135,141,282,306,315,321,384,405,411],{"title":88,"list":89,"isOpened":49},"Bash",[90,93],{"name":91,"path":92,"isActive":49},"Дан фрагмент bash-скрипта: cd ~; mkdir foo... Что в нем происходит?","/technical-interview/tasks/here-is-a-fragment-of-a-bash-script-cd-mkdir-foo-what-is-happening-in-this-script",{"name":94,"path":95,"isActive":49},"Дан фрагмент bash-скрипта: target=$(ps -Af | grep $1 | head -n 1)...","/technical-interview/tasks/here-is-a-fragment-of-a-bash-script-target-ps-af-grep-1-head-n-1",{"title":97,"list":98,"isOpened":49},"CSS",[99,102,105,108,111,114,117,120],{"name":100,"path":101,"isActive":49},"Дан HTML-код. Какой будет цвет у текста «Some dummy text»?","/technical-interview/tasks/the-html-code-is-given-what-will-be-the-color-of-the-some-dummy-text",{"name":103,"path":104,"isActive":49},"Есть шаблон HTML и CSS кода. Какой будет цвет у текста «Таким образом, постоянное»?","/technical-interview/tasks/there-is-a-template-for-html-and-css-code-what-color-will-the-text-thus-constant-have",{"name":106,"path":107,"isActive":49},"Есть шаблон вложенного HTML кода. Какой будет цвет у текста «One more dummy text»?","/technical-interview/tasks/there-is-a-template-for-embedded-html-code-what-will-be-the-color-of-the-one-more-dummy-text",{"name":109,"path":110,"isActive":49},"Есть шаблон вложенного HTML кода. Будет ли display:block у body влиять на span?","/technical-interview/tasks/there-is-a-template-for-embedded-html-code-will-there-be-a-display-does-bodys-block-affect-span",{"name":112,"path":113,"isActive":49},"Есть HTML код. Будет ли font-weight на span влиять?","/technical-interview/tasks/there-is-an-html-code-will-font-weight-affect-span",{"name":115,"path":116,"isActive":49},"Flexbox и Grid, чем отличаются друг от друга?","/technical-interview/tasks/what-are-the-differences-between-flexbox-and-grid",{"name":118,"path":119,"isActive":49},"Заменяют ли Flexbox и Grid друг друга?","/technical-interview/tasks/do-flexbox-and-grid-replace-each-other",{"name":121,"path":122,"isActive":49},"Есть CSS и JS анимация. Какая между ними разница, что быстрее, что более удобно?","/technical-interview/tasks/there-are-css-and-js-animations-what-is-the-difference-between-them-and-which-is-faster-and-more-convenient",{"title":124,"list":125,"isOpened":49},"Git",[126,129,132],{"name":127,"path":128,"isActive":49},"Разрабатывал, взял закоммитил, запушил. Оказалось, что запушил не в ту ветку, точнее, коммит не в ту ветку. Какие действия?","/technical-interview/tasks/developed-it-committed-it-and-launched-it-it-turned-out-that-i-had-pushed-it-to-the-wrong-branch-or-rather-the-commit-was-in-the-wrong-branch-what-actions",{"name":130,"path":131,"isActive":49},"В git есть несколько вариантов слияния веток, какие? Чем отличаются?","/technical-interview/tasks/git-has-several-options-for-merging-branches-which-ones-how-are-they-different",{"name":133,"path":134,"isActive":49},"Какие существуют стратегии ветвления для работы команды? Что это такое?","/technical-interview/tasks/what-are-the-branching-strategies-for-the-team-what-is-it",{"title":136,"list":137,"isOpened":49},"HTML",[138],{"name":139,"path":140,"isActive":49},"Что такое HTML?","/technical-interview/tasks/what-is-html",{"title":142,"list":143,"isOpened":49},"JavaScript",[144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204,207,210,213,216,219,222,225,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,276,279],{"name":145,"path":146,"isActive":49},"Какие логические значения в console.log будут получены?","/technical-interview/tasks/prototype-what-logical-values-will-be-received-in-console-log",{"name":148,"path":149,"isActive":49},"Почему опасно писать прямо в прототипы базовых типов?","/technical-interview/tasks/why-is-it-dangerous-to-write-directly-to-the-prototypes-of-basic-types",{"name":151,"path":152,"isActive":49},"Что вернёт следующий код? Object.create(null).hasOwnProperty('toString')","/technical-interview/tasks/what-will-the-following-code-return-object-create-null-has-own-property-to-string",{"name":154,"path":155,"isActive":49},"Какое значение выведет консоль с object.property?","/technical-interview/tasks/what-value-will-the-console-output-with-object-property",{"name":157,"path":158,"isActive":49},"Что выведется в console.log([arr[0](), arr[0]()])?","/technical-interview/tasks/what-will-be-displayed-in-console-log-arr-0-arr-0",{"name":160,"path":161,"isActive":49},"Что выведет console.log в результате выполнения цикла while?","/technical-interview/tasks/what-will-console-log-output-as-a-result-of-executing-the-while-loop",{"name":163,"path":164,"isActive":49},"Есть функция и объект. Напишите все известные вам способы, чтобы вывести в консоли значение x из объекта, используя функцию","/technical-interview/tasks/there-is-a-function-and-an-object-write-all-the-ways-you-know-to-output-the-value-of-x-from-an-object-in-the-console-using-the-function",{"name":166,"path":167,"isActive":49},"Что вернёт метод book.getUpperName()?","/technical-interview/tasks/what-will-the-book-get-upper-name-method-return",{"name":169,"path":170,"isActive":49},"Переменные объявлены следующим образом: a=3; b=«hello»;. Укажите правильное утверждение","/technical-interview/tasks/variables-are-declared-as-follows-specify-the-correct-statement",{"name":172,"path":173,"isActive":49},"Что выведет консоль в случае присвоения свойства массиву по строковому положительному индексу?","/technical-interview/tasks/what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-positive-string-index",{"name":175,"path":176,"isActive":49},"Что выведет консоль в случае присвоения свойства массиву по строковому отрицательному индексу?","/technical-interview/tasks/what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-negative-string-index",{"name":178,"path":179,"isActive":49},"Что выведет консоль в случае удаления элемента массива с помощью оператора delete?","/technical-interview/tasks/what-will-the-console-output-if-an-array-element-is-deleted-using-the-delete-operator",{"name":181,"path":182,"isActive":49},"Что вернёт этот код: typeof (function(){})()","/technical-interview/tasks/what-this-code-will-return-typeof-function",{"name":184,"path":185,"isActive":49},"Что получится в результате передачи объекта как аргумента в функцию и выполнения кода?","/technical-interview/tasks/what-will-happen-when-an-object-is-passed-as-an-argument-to-a-function-and-the-code-is-executed",{"name":187,"path":188,"isActive":49},"Какие способы объявления функции есть в JavaScript?","/technical-interview/tasks/what-are-the-ways-to-declare-a-function-in-javascript",{"name":190,"path":191,"isActive":49},"Что такое this в JavaScript?","/technical-interview/tasks/what-is-this-in-javascript",{"name":193,"path":194,"isActive":49},"Что такое Event Loop, как работает?","/technical-interview/tasks/what-is-an-event-loop-and-how-does-it-work",{"name":196,"path":197,"isActive":49},"Что будет, если вызвать typeof на необъявленной переменной?","/technical-interview/tasks/what-happens-if-you-call-typeof-on-an-undeclared-variable",{"name":199,"path":200,"isActive":49},"Что показывает оператор typeof в JavaScript?","/technical-interview/tasks/what-does-the-typeof-operator-show-in-javascript",{"name":202,"path":203,"isActive":49},"Какие типы данных существует в JavaScript?","/technical-interview/tasks/what-types-of-data-exist-in-javascript",{"name":205,"path":206,"isActive":49},"Какую структуру использовать для хранения упорядоченного списка строк в JavaScript?","/technical-interview/tasks/what-is-the-best-structure-to-use-for-storing-an-ordered-list-of-strings-in-javascript",{"name":208,"path":209,"isActive":49},"Что вернет typeof для массива?","/technical-interview/tasks/what-will-typeof-return-for-an-array",{"name":211,"path":212,"isActive":49},"Почему оператор typeof, применённый к массиву, возвращает объект?","/technical-interview/tasks/why-does-the-typeof-operator-applied-to-an-array-return-an-object",{"name":214,"path":215,"isActive":49},"Если нужно хранить список уникальных строк, какую структуру данных выбрать?","/technical-interview/tasks/if-you-need-to-store-a-list-of-unique-strings-which-data-structure-should-i-choose",{"name":217,"path":218,"isActive":49},"Что возвращает typeof для new Set в JavaScript?","/technical-interview/tasks/what-does-typeof-return-for-new-set-in-javascript",{"name":220,"path":221,"isActive":49},"Почему в JavaScript два объекта с одинаковым содержимым при сравнении возвращают false?","/technical-interview/tasks/why-do-two-objects-with-the-same-content-return-false-when-compared-in-javascript",{"name":223,"path":224,"isActive":49},"В чем разница между микро- и макро-тасками в JavaScript?","/technical-interview/tasks/what-is-the-difference-between-micro-and-macro-tasks-in-javascript",{"name":226,"path":227,"isActive":49},"arr.push(0) повлияет на массив так же, как если бы мы выполнили...","/technical-interview/tasks/arr-push-0-will-affect-the-array-in-the-same-way-as-if-we-performed",{"name":229,"path":230,"isActive":49},"Вернуть массив от 1 до n, где числа, кратные 3, заменены на 'fizz', кратные 5 - на 'buzz', а кратные и 3, и 5 одновременно - на 'fizzbuzz'","/technical-interview/tasks/returns-an-array-from-1-to-n-replacing-numbers-that-are-multiples-of-3-with-fizz-numbers-that-are-multiples-of-5-with-buzz-and-numbers-that-are-multiples-of-both-3-and-5-with-fizzbuzz",{"name":232,"path":233,"isActive":49},"Дана строка: 'one.two.three.four.five'. Необходимо из строки сделать вложенный объект","/technical-interview/tasks/the-string-one-two-three-four-five-is-given-it-is-necessary-to-make-a-nested-object-out-of-the-string",{"name":235,"path":236,"isActive":49},"Дано дерево (вложенный объект), надо найти сумму всех вершин","/technical-interview/tasks/given-a-tree-nested-object-it-is-necessary-to-find-the-sum-of-all-vertices",{"name":238,"path":239,"isActive":49},"Для каждого вложенного объекта нужно добавить свойство level, которое равняется числу - номер вложенности","/technical-interview/tasks/for-each-nested-object-you-need-to-add-the-level-property-which-is-equal-to-a-number-the-nesting-number",{"name":241,"path":242,"isActive":49},"Для каждой ветви дерева записать номер вложенности данной ветви","/technical-interview/tasks/for-each-branch-of-the-tree-write-down-the-nesting-number-of-this-branch",{"name":244,"path":245,"isActive":49},"Есть массив, в котором лежат объекты с датами, необходимо отсортировать даты по возрастанию","/technical-interview/tasks/there-is-an-array-containing-objects-with-dates-that-need-to-be-sorted-by-date",{"name":247,"path":248,"isActive":49},"Есть слова в массиве, необходимо определить, состоят ли они из одних и тех же букв","/technical-interview/tasks/there-are-words-in-the-array-it-is-necessary-to-determine-whether-they-consist-of-the-same-letters",{"name":250,"path":251,"isActive":49},"Есть строка, состоящая из разных скобок, необходимо проверить, закрыты ли все","/technical-interview/tasks/there-is-a-string-consisting-of-different-brackets-it-is-necessary-to-check-whether-all-are-closed",{"name":253,"path":254,"isActive":49}," Найти в массиве неповторяющиеся числа","/technical-interview/tasks/find-non-repeating-numbers-in-an-array",{"name":256,"path":257,"isActive":49},"Напишите функцию, который сделает из массива объект","/technical-interview/tasks/write-a-function-that-will-make-an-object-out-of-an-array",{"name":259,"path":260,"isActive":49},"Необходимо проверить, являются ли две строки анаграммами друг друга","/technical-interview/tasks/checks-whether-two-strings-are-anagrams-of-each-other",{"name":262,"path":263,"isActive":49},"Нечётные числа должны отсортироваться по возрастанию, а чётные должны остаться на своих местах","/technical-interview/tasks/odd-numbers-should-be-sorted-in-ascending-order-and-even-numbers-should-remain-in-their-original-positions",{"name":265,"path":266,"isActive":49},"Определить, является ли слово палиндромом","/technical-interview/tasks/determines-whether-a-word-is-a-palindrome",{"name":268,"path":269,"isActive":49},"«Расплющивание» массива","/technical-interview/tasks/flattening-the-array",{"name":271,"path":272,"isActive":49},"Реализовать функцию, принимающую аргументы \"*\", \"1\", \"b\", \"1c\" и возвращающую строку \"1*b*1c\"","/technical-interview/tasks/implement-a-function-that-accepts-arguments-1-b-1c-and-the-return-string-1-b-1c",{"name":274,"path":275,"isActive":49},"Сжатие строк","/technical-interview/tasks/string-compression",{"name":277,"path":278,"isActive":49},"Уникализация значений в массиве","/technical-interview/tasks/unifying-values-in-an-array",{"name":280,"path":281,"isActive":49},"Числа от 1 до 100 находятся в массиве, они хаотично перемешанные, но в нём не хватает одного числа из этой последовательности. Необходимо найти его","/technical-interview/tasks/the-numbers-from-1-to-100-are-in-the-array-they-are-randomly-mixed-but-it-lacks-one-number-from-this-sequence-it-is-necessary-to-find-him",{"title":283,"list":284,"isOpened":49},"React",[285,288,291,294,297,300,303],{"name":286,"path":287,"isActive":49},"Для чего нужен React, какие он решает проблемы?","/technical-interview/tasks/what-is-react-used-for-and-what-problems-does-it-solve",{"name":289,"path":290,"isActive":49},"Какой механизм лежит в основе оптимизации обновлений DOM в React?","/technical-interview/tasks/what-is-the-underlying-mechanism-for-optimizing-dom-updates-in-react",{"name":292,"path":293,"isActive":49},"Если убрать в React VDOM/Fiber, и вручную изменять DOM, разве это не оптимально?","/technical-interview/tasks/if-you-remove-the-vdom-fiber-in-react-and-manually-change-the-dom-isn-t-that-optimal",{"name":295,"path":296,"isActive":49},"Есть блок кода. Что в реальном DOM изменится после нажатия на кнопку?","/technical-interview/tasks/there-is-a-block-of-code-what-changes-in-the-real-dom-after-clicking-the-button",{"name":298,"path":299,"isActive":49},"Есть код, в котором список и кнопка. Что в реальном DOM изменится после нажатия на кнопку?","/technical-interview/tasks/there-is-a-code-in-which-there-is-a-list-and-a-button-what-will-change-in-the-real-dom-after-clicking-on-the-button",{"name":301,"path":302,"isActive":49},"Зачем нужен Redux (Mobx/Effector)? Зачем нужен менеджер состояния? Какие проблемы решает?","/technical-interview/tasks/why-do-we-need-redux-mobx-effector-why-do-we-need-a-state-manager-what-problems-does-it-solve",{"name":304,"path":305,"isActive":49},"Что мешает организовать централизованное состояние без менеджера состояния? Если организовать состояние механизмами реакта: контекстом, стейтом, в чем проблема? Что менеджеры состояния привносят?","/technical-interview/tasks/what-prevents-you-from-organizing-a-centralized-state-without-a-state-manager-if-you-organize-the-state-using-react-context-and-state-mechanisms-what-is-the-problem-what-do-state-managers-add",{"title":307,"list":308,"isOpened":49},"Алгоритмы",[309,312],{"name":310,"path":311,"isActive":49},"Что такое алгоритмическая сложность?","/technical-interview/tasks/what-is-algorithmic-complexity",{"name":313,"path":314,"isActive":49},"Какая алгоритмическая сложность у \"быстрой сортировки\"?","/technical-interview/tasks/what-is-the-algorithmic-complexity-of-quick-sort",{"title":316,"list":317,"isOpened":49},"Дебаггинг",[318],{"name":319,"path":320,"isActive":49},"Как диагностировать и исправить нежелательное изменение цвета фона по клику на кнопку, если исходный код сайта запутан и недоступен для прямого чтения?","/technical-interview/tasks/how-can-diagnose-and-fix-unwanted-background-color-changes-when-clicking-on-a-button-if-the-source-code-of-the-site-is-confusing-and-inaccessible-to-direct-reading",{"title":322,"list":323,"isOpened":49},"Компьютерные сети",[324,327,330,333,336,339,342,345,348,351,354,357,360,363,366,369,372,375,378,381],{"name":325,"path":326,"isActive":49},"Как браузер после ввода домена понимает, откуда брать сайт?","/technical-interview/tasks/how-does-the-browser-know-where-to-get-the-website-after-entering-the-domain",{"name":328,"path":329,"isActive":49},"Что такое DNS, как DNS находит нужный IP-адрес?","/technical-interview/tasks/what-is-dns-and-how-does-dns-find-the-correct-ip-address",{"name":331,"path":332,"isActive":49},"Как домен попадает в DNS в таблицу соответствия: домен – ip","/technical-interview/tasks/how-does-a-domain-get-into-the-dns-mapping-table-domain-ip",{"name":334,"path":335,"isActive":49},"Как браузер решает, какое соединение ему открывать, TCP или UDP?","/technical-interview/tasks/how-does-a-browser-decide-whether-to-open-a-tcp-or-udp-connection",{"name":337,"path":338,"isActive":49},"Ключевые отличия TCP и UDP","/technical-interview/tasks/key-differences-between-tcp-and-udp",{"name":340,"path":341,"isActive":49},"\"TCP/IP\" - кем является TCP, а кем IP в данном случае?","/technical-interview/tasks/tcp-ip-who-is-tcp-and-who-is-ip-in-this-case",{"name":343,"path":344,"isActive":49},"Что такое HTTP и из чего состоит?","/technical-interview/tasks/what-is-http-and-what-does-it-consist-of",{"name":346,"path":347,"isActive":49},"Что такое заголовки в HTTP и зачем они нужны?","/technical-interview/tasks/what-are-http-headers-and-why-do-we-need-them",{"name":349,"path":350,"isActive":49},"Что такое параметры в HTTP?","/technical-interview/tasks/what-are-http-parameters",{"name":352,"path":353,"isActive":49},"Где находится HTML-код в структуре HTTP-ответа?","/technical-interview/tasks/where-is-the-html-code-located-in-the-http-response-structure",{"name":355,"path":356,"isActive":49},"Чем отличаются 1.0, 1.1, 2.0, 3.0 версии HTTP?","/technical-interview/tasks/what-are-the-differences-between-http-versions-1-0-1-1-2-0-and-3-0",{"name":358,"path":359,"isActive":49},"Пользователь авторизован на сайте. Как сервер узнает об этом с последующими другими заходами, что «я – авторизованный пользователь»?","/technical-interview/tasks/the-user-is-logged-in-on-the-website-how-does-the-server-know-that-i-am-an-authorized-user-when-the-user-logs-in-again",{"name":361,"path":362,"isActive":49},"Что такое cookie?","/technical-interview/tasks/what-is-a-cookie",{"name":364,"path":365,"isActive":49},"Кто является инициатором записи cookie в браузере?","/technical-interview/tasks/who-initiates-the-cookie-recording-in-the-browser",{"name":367,"path":368,"isActive":49},"Есть ли возможность с клиента (с браузера) управлять cookie?","/technical-interview/tasks/is-it-possible-to-manage-cookies-from-the-client-browser",{"name":370,"path":371,"isActive":49},"Верно ли утверждение, что злоумышленник, контролирующий роутер и прослушивающий трафик, может получить логины и пароли от сайтов, на которые заходит клиент?","/technical-interview/tasks/is-it-true-that-an-attacker-who-controls-a-router-and-listens-to-traffic-can-obtain-logins-and-passwords-from-websites-that-a-client-visits",{"name":373,"path":374,"isActive":49},"Всё, что идет по HTTPS – оно защищено?","/technical-interview/tasks/is-everything-that-goes-through-https-secure",{"name":376,"path":377,"isActive":49},"Все данные зашифрованы, используется https. Хакер взламывает dns и делает подмену одного ip на другой, на фишинговый сайт. В этом случае, злоумышленник может получить данные (логин \\ пароль)?","/technical-interview/tasks/all-data-is-encrypted-https-is-used-let-s-assume-a-hacker-hacks-the-dns-and-makes-a-substitution-of-one-ip-for-another-a-phishing-site",{"name":379,"path":380,"isActive":49},"Есть веб-приложение. Помимо HTTP, какие протоколы того же уровня (Application Layer) можно дополнительно использовать в веб-приложении в браузере?","/technical-interview/tasks/there-is-a-web-application-in-addition-to-http-what-other-protocols-of-the-same-level-application-layer-can-be-used-in-the-web-application-in-browser",{"name":382,"path":383,"isActive":49},"Каким способом может выполняться авторизация пользователя на сайте?","/technical-interview/tasks/how-can-a-user-be-authorized-on-a-website",{"title":385,"list":386,"isOpened":49},"Отрисовка в браузере",[387,390,393,396,399,402],{"name":388,"path":389,"isActive":49},"Что происходит, когда HTTP прислал HTML? Что браузер дальше делает c HTML с учетом того, что она валидная?","/technical-interview/tasks/what-happens-when-http-sends-html-what-does-the-browser-do-with-this-html-given-that-it-is-valid",{"name":391,"path":392,"isActive":49},"Как браузер парсит JavaScript и изображения при рендеринге?","/technical-interview/tasks/how-the-browser-parses-javascript-and-images-when-rendering",{"name":394,"path":395,"isActive":49},"Что в браузере блокирует рендеринг страницы?","/technical-interview/tasks/what-is-blocking-the-page-rendering-in-the-browser",{"name":397,"path":398,"isActive":49},"Что такое DOM в браузере? Что такое CSSOM?","/technical-interview/tasks/what-is-dom-in-a-browser-what-is-cssom",{"name":400,"path":401,"isActive":49},"Что является узлами в DOM?","/technical-interview/tasks/what-are-nodes-in-the-dom",{"name":403,"path":404,"isActive":49},"Из чего состоит CSSOM?","/technical-interview/tasks/what-does-cssom-consist-of",{"title":406,"list":407,"isOpened":49},"Ревью кода",[408],{"name":409,"path":410,"isActive":49},"По каким характеристикам, ревьюер понимает, что данный код - хороший, а этот код - плохой?","/technical-interview/tasks/how-does-a-reviewer-know-which-code-is-good-and-which-code-is-bad",{"title":412,"list":413,"isOpened":49},"Теория вероятности",[414,417,420],{"name":415,"path":416,"isActive":49},"В комнате три человека. Какова вероятность того, что хотя бы двое из них одного пола? То есть два и более.","/technical-interview/tasks/there-are-three-people-in-the-room-what-is-the-probability-that-at-least-two-of-them-are-of-the-same-sex-that-is-two-or-more",{"name":418,"path":419,"isActive":49},"Есть монета. Ее подбрасывают пять раз подряд. Каждый раз записывается, что выпало - орел или решка. Сколько разных последовательностей орлов и решек может при этом получиться?","/technical-interview/tasks/there-is-a-coin-it-is-tossed-five-times-in-a-row-each-time-it-is-recorded-whether-it-lands-on-heads-or-tails-how-many-different-sequences-of-heads-and-tails-can-be-obtained",{"name":421,"path":422,"isActive":49},"Как гарантированно найти лёгкую фальшивую монету среди 8 за минимальное число взвешиваний на чашечных весах?","/technical-interview/tasks/how-can-you-guarantee-to-find-an-easy-fake-coin-among-8-in-the-minimum-number-of-weighings-on-a-balance-scale",{"slugs":424},[425,428,430,432,434,437,440,442,444,446,448,450,453,455,457,459,461,463,465,467,469,471,473,475,477,479,481,483,485,487,489,491,493,495,497,499,501,503,505,507,509,511,513,515,517,519,521,523,525,527,529,531,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,564,566,568,570,572,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604,606,608,610,612,614,616,618,620,622,624,626,628,630,632,634,635,637,639,641,643],{"name":426,"value":427},"Теоретические задания","theoretical-tasks",{"name":181,"value":429},"what-this-code-will-return-typeof-function",{"name":80,"value":431},"where-to-begin",{"name":148,"value":433},"why-is-it-dangerous-to-write-directly-to-the-prototypes-of-basic-types",{"name":435,"value":436},"Backend","backend",{"name":438,"value":439},"Frontend","frontend",{"name":145,"value":441},"prototype-what-logical-values-will-be-received-in-console-log",{"name":262,"value":443},"odd-numbers-should-be-sorted-in-ascending-order-and-even-numbers-should-remain-in-their-original-positions",{"name":253,"value":445},"find-non-repeating-numbers-in-an-array",{"name":226,"value":447},"arr-push-0-will-affect-the-array-in-the-same-way-as-if-we-performed",{"name":232,"value":449},"the-string-one-two-three-four-five-is-given-it-is-necessary-to-make-a-nested-object-out-of-the-string",{"name":451,"value":452},"Реализовать функцию, похоже как в Jquery","implement-a-function-similar-to-jquery",{"name":238,"value":454},"for-each-nested-object-you-need-to-add-the-level-property-which-is-equal-to-a-number-the-nesting-number",{"name":154,"value":456},"what-value-will-the-console-output-with-object-property",{"name":157,"value":458},"what-will-be-displayed-in-console-log-arr-0-arr-0",{"name":229,"value":460},"returns-an-array-from-1-to-n-replacing-numbers-that-are-multiples-of-3-with-fizz-numbers-that-are-multiples-of-5-with-buzz-and-numbers-that-are-multiples-of-both-3-and-5-with-fizzbuzz",{"name":259,"value":462},"checks-whether-two-strings-are-anagrams-of-each-other",{"name":265,"value":464},"determines-whether-a-word-is-a-palindrome",{"name":244,"value":466},"there-is-an-array-containing-objects-with-dates-that-need-to-be-sorted-by-date",{"name":271,"value":468},"implement-a-function-that-accepts-arguments-1-b-1c-and-the-return-string-1-b-1c",{"name":235,"value":470},"given-a-tree-nested-object-it-is-necessary-to-find-the-sum-of-all-vertices",{"name":241,"value":472},"for-each-branch-of-the-tree-write-down-the-nesting-number-of-this-branch",{"name":247,"value":474},"there-are-words-in-the-array-it-is-necessary-to-determine-whether-they-consist-of-the-same-letters",{"name":280,"value":476},"the-numbers-from-1-to-100-are-in-the-array-they-are-randomly-mixed-but-it-lacks-one-number-from-this-sequence-it-is-necessary-to-find-him",{"name":250,"value":478},"there-is-a-string-consisting-of-different-brackets-it-is-necessary-to-check-whether-all-are-closed",{"name":256,"value":480},"write-a-function-that-will-make-an-object-out-of-an-array",{"name":160,"value":482},"what-will-console-log-output-as-a-result-of-executing-the-while-loop",{"name":163,"value":484},"there-is-a-function-and-an-object-write-all-the-ways-you-know-to-output-the-value-of-x-from-an-object-in-the-console-using-the-function",{"name":175,"value":486},"what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-negative-string-index",{"name":178,"value":488},"what-will-the-console-output-if-an-array-element-is-deleted-using-the-delete-operator",{"name":277,"value":490},"unifying-values-in-an-array",{"name":268,"value":492},"flattening-the-array",{"name":166,"value":494},"what-will-the-book-get-upper-name-method-return",{"name":274,"value":496},"string-compression",{"name":172,"value":498},"what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-positive-string-index",{"name":184,"value":500},"what-will-happen-when-an-object-is-passed-as-an-argument-to-a-function-and-the-code-is-executed",{"name":325,"value":502},"how-does-the-browser-know-where-to-get-the-website-after-entering-the-domain",{"name":331,"value":504},"how-does-a-domain-get-into-the-dns-mapping-table-domain-ip",{"name":334,"value":506},"how-does-a-browser-decide-whether-to-open-a-tcp-or-udp-connection",{"name":337,"value":508},"key-differences-between-tcp-and-udp",{"name":340,"value":510},"tcp-ip-who-is-tcp-and-who-is-ip-in-this-case",{"name":343,"value":512},"what-is-http-and-what-does-it-consist-of",{"name":346,"value":514},"what-are-http-headers-and-why-do-we-need-them",{"name":349,"value":516},"what-are-http-parameters",{"name":352,"value":518},"where-is-the-html-code-located-in-the-http-response-structure",{"name":139,"value":520},"what-is-html",{"name":355,"value":522},"what-are-the-differences-between-http-versions-1-0-1-1-2-0-and-3-0",{"name":358,"value":524},"the-user-is-logged-in-on-the-website-how-does-the-server-know-that-i-am-an-authorized-user-when-the-user-logs-in-again",{"name":361,"value":526},"what-is-a-cookie",{"name":364,"value":528},"who-initiates-the-cookie-recording-in-the-browser",{"name":367,"value":530},"is-it-possible-to-manage-cookies-from-the-client-browser",{"name":532,"value":533},"Лайвкодинг","livecoding",{"name":151,"value":535},"what-will-the-following-code-return-object-create-null-has-own-property-to-string",{"name":373,"value":537},"is-everything-that-goes-through-https-secure",{"name":376,"value":539},"all-data-is-encrypted-https-is-used-let-s-assume-a-hacker-hacks-the-dns-and-makes-a-substitution-of-one-ip-for-another-a-phishing-site",{"name":379,"value":541},"there-is-a-web-application-in-addition-to-http-what-other-protocols-of-the-same-level-application-layer-can-be-used-in-the-web-application-in-browser",{"name":391,"value":543},"how-the-browser-parses-javascript-and-images-when-rendering",{"name":388,"value":545},"what-happens-when-http-sends-html-what-does-the-browser-do-with-this-html-given-that-it-is-valid",{"name":394,"value":547},"what-is-blocking-the-page-rendering-in-the-browser",{"name":397,"value":549},"what-is-dom-in-a-browser-what-is-cssom",{"name":400,"value":551},"what-are-nodes-in-the-dom",{"name":403,"value":553},"what-does-cssom-consist-of",{"name":100,"value":555},"the-html-code-is-given-what-will-be-the-color-of-the-some-dummy-text",{"name":103,"value":557},"there-is-a-template-for-html-and-css-code-what-color-will-the-text-thus-constant-have",{"name":106,"value":559},"there-is-a-template-for-embedded-html-code-what-will-be-the-color-of-the-one-more-dummy-text",{"name":109,"value":561},"there-is-a-template-for-embedded-html-code-will-there-be-a-display-does-bodys-block-affect-span",{"name":112,"value":563},"there-is-an-html-code-will-font-weight-affect-span",{"name":115,"value":565},"what-are-the-differences-between-flexbox-and-grid",{"name":118,"value":567},"do-flexbox-and-grid-replace-each-other",{"name":121,"value":569},"there-are-css-and-js-animations-what-is-the-difference-between-them-and-which-is-faster-and-more-convenient",{"name":84,"value":571},"tasks",{"name":187,"value":573},"what-are-the-ways-to-declare-a-function-in-javascript",{"name":190,"value":575},"what-is-this-in-javascript",{"name":193,"value":577},"what-is-an-event-loop-and-how-does-it-work",{"name":196,"value":579},"what-happens-if-you-call-typeof-on-an-undeclared-variable",{"name":199,"value":581},"what-does-the-typeof-operator-show-in-javascript",{"name":202,"value":583},"what-types-of-data-exist-in-javascript",{"name":205,"value":585},"what-is-the-best-structure-to-use-for-storing-an-ordered-list-of-strings-in-javascript",{"name":208,"value":587},"what-will-typeof-return-for-an-array",{"name":211,"value":589},"why-does-the-typeof-operator-applied-to-an-array-return-an-object",{"name":214,"value":591},"if-you-need-to-store-a-list-of-unique-strings-which-data-structure-should-i-choose",{"name":217,"value":593},"what-does-typeof-return-for-new-set-in-javascript",{"name":286,"value":595},"what-is-react-used-for-and-what-problems-does-it-solve",{"name":292,"value":597},"if-you-remove-the-vdom-fiber-in-react-and-manually-change-the-dom-isn-t-that-optimal",{"name":295,"value":599},"there-is-a-block-of-code-what-changes-in-the-real-dom-after-clicking-the-button",{"name":298,"value":601},"there-is-a-code-in-which-there-is-a-list-and-a-button-what-will-change-in-the-real-dom-after-clicking-on-the-button",{"name":301,"value":603},"why-do-we-need-redux-mobx-effector-why-do-we-need-a-state-manager-what-problems-does-it-solve",{"name":319,"value":605},"how-can-diagnose-and-fix-unwanted-background-color-changes-when-clicking-on-a-button-if-the-source-code-of-the-site-is-confusing-and-inaccessible-to-direct-reading",{"name":127,"value":607},"developed-it-committed-it-and-launched-it-it-turned-out-that-i-had-pushed-it-to-the-wrong-branch-or-rather-the-commit-was-in-the-wrong-branch-what-actions",{"name":130,"value":609},"git-has-several-options-for-merging-branches-which-ones-how-are-they-different",{"name":133,"value":611},"what-are-the-branching-strategies-for-the-team-what-is-it",{"name":409,"value":613},"how-does-a-reviewer-know-which-code-is-good-and-which-code-is-bad",{"name":91,"value":615},"here-is-a-fragment-of-a-bash-script-cd-mkdir-foo-what-is-happening-in-this-script",{"name":94,"value":617},"here-is-a-fragment-of-a-bash-script-target-ps-af-grep-1-head-n-1",{"name":310,"value":619},"what-is-algorithmic-complexity",{"name":313,"value":621},"what-is-the-algorithmic-complexity-of-quick-sort",{"name":220,"value":623},"why-do-two-objects-with-the-same-content-return-false-when-compared-in-javascript",{"name":382,"value":625},"how-can-a-user-be-authorized-on-a-website",{"name":223,"value":627},"what-is-the-difference-between-micro-and-macro-tasks-in-javascript",{"name":415,"value":629},"there-are-three-people-in-the-room-what-is-the-probability-that-at-least-two-of-them-are-of-the-same-sex-that-is-two-or-more",{"name":418,"value":631},"there-is-a-coin-it-is-tossed-five-times-in-a-row-each-time-it-is-recorded-whether-it-lands-on-heads-or-tails-how-many-different-sequences-of-heads-and-tails-can-be-obtained",{"name":421,"value":633},"how-can-you-guarantee-to-find-an-easy-fake-coin-among-8-in-the-minimum-number-of-weighings-on-a-balance-scale",{"name":74,"value":75},{"name":370,"value":636},"is-it-true-that-an-attacker-who-controls-a-router-and-listens-to-traffic-can-obtain-logins-and-passwords-from-websites-that-a-client-visits",{"name":328,"value":638},"what-is-dns-and-how-does-dns-find-the-correct-ip-address",{"name":169,"value":640},"variables-are-declared-as-follows-specify-the-correct-statement",{"name":289,"value":642},"what-is-the-underlying-mechanism-for-optimizing-dom-updates-in-react",{"name":304,"value":644},"what-prevents-you-from-organizing-a-centralized-state-without-a-state-manager-if-you-organize-the-state-using-react-context-and-state-mechanisms-what-is-the-problem-what-do-state-managers-add",{"cooperation":646,"copyright":649,"reportError":650,"socialNetwork":652},{"link":647,"title":648},"https://t.me/baurinanton","Сотрудничество","© “GOOD WEB JOB!”",{"label":651,"link":647},"Сообщить об ошибке",{"label":653,"socialNetworkList":654},"Мы в соцсетях:",[655,658,661],{"icon":19,"link":656,"title":657},"https://max.ru/u/f9LHodD0cOKMaukdnnahTeL5pwvjrPfUaZ4S8_1rsNy9I9qsmc9Ar3kP_y8","Max",{"icon":659,"link":647,"title":660},"ic:baseline-telegram","Telegram",{"icon":662,"link":663,"title":664},"ri:vk-fill","https://vk.com/baurinanton","VK",{"data":666,"body":667},{},{"type":668,"children":669},"root",[670],{"type":671,"tag":672,"props":673,"children":674},"element","p",{},[675],{"type":676,"value":415},"text",{"data":678,"body":679},{},{"type":668,"children":680},[681],{"type":671,"tag":672,"props":682,"children":683},{},[684],{"type":676,"value":45},{"data":686,"body":687},{},{"type":668,"children":688},[689],{"type":671,"tag":672,"props":690,"children":691},{},[692],{"type":676,"value":48},{"data":694,"body":695},{},{"type":668,"children":696},[697],{"type":671,"tag":672,"props":698,"children":699},{},[700],{"type":676,"value":52},{"data":702,"body":703},{},{"type":668,"children":704},[705],{"type":671,"tag":672,"props":706,"children":707},{},[708],{"type":676,"value":55},{"data":710,"body":711},{},{"type":668,"children":712},[713],{"type":671,"tag":672,"props":714,"children":715},{},[716],{"type":676,"value":56},{"data":718,"body":719},{},{"type":668,"children":720},[721,740,745],{"type":671,"tag":672,"props":722,"children":723},{},[724,730,732,738],{"type":671,"tag":725,"props":726,"children":727},"strong",{},[728],{"type":676,"value":729},"Правильный ответ: 1",{"type":676,"value":731}," - ",{"type":671,"tag":733,"props":734,"children":736},"code",{"className":735},[],[737],{"type":676,"value":45},{"type":676,"value":739}," хотя бы двое одного пола будут всегда.",{"type":671,"tag":672,"props":741,"children":742},{},[743],{"type":676,"value":744},"Неверные варианты:\n2. 3/4 — это типичный ответ для задачи про 2 детей: «хотя бы один мальчик», но здесь людей трое.\n3. 7/8 — выглядит как «1 − 1/8», но «1/8» здесь не является вероятностью отсутствия совпадений (такого события вообще не бывает при 2 полах).\n4. 1/2 — относится к другим формулировкам (например, «вероятность, что ровно двое одного пола» при равновероятных исходах).",{"type":671,"tag":672,"props":746,"children":747},{},[748],{"type":676,"value":749},"В этой задаче результат равен 1 не потому, что «так получилось при 50/50», а потому что при двух возможных полах событие «хотя бы двое одного пола» является неизбежным (детерминированным) фактом для любых трёх людей.",{"data":751,"body":752},{},{"type":668,"children":753},[754,759,764,779],{"type":671,"tag":672,"props":755,"children":756},{},[757],{"type":676,"value":758},"Принцип Дирихле (его также называют принципом «ящиков и шаров») формулируется так: если объектов больше, чем категорий, то какая-то категория получит минимум два объекта.",{"type":671,"tag":672,"props":760,"children":761},{},[762],{"type":676,"value":763},"Применение к задаче:",{"type":671,"tag":765,"props":766,"children":767},"ul",{},[768,774],{"type":671,"tag":769,"props":770,"children":771},"li",{},[772],{"type":676,"value":773},"Категории (ящики): 2 пола (М и Ж).",{"type":671,"tag":769,"props":775,"children":776},{},[777],{"type":676,"value":778},"Объекты (шары): 3 человека.",{"type":671,"tag":672,"props":780,"children":781},{},[782],{"type":676,"value":783},"При распределении 3 людей по 2 категориям неизбежно найдутся минимум двое, попавшие в одну и ту же категорию (то есть одного пола). Следовательно, событие «хотя бы двое одного пола» происходит всегда, а вероятность равна 1.",{"data":785,"body":786},{},{"type":668,"children":787},[788],{"type":671,"tag":672,"props":789,"children":790},{},[791],{"type":676,"value":18},{"data":793,"body":794},{},{"type":668,"children":795},[796,801,806,1016,1021,1026,1049,1054],{"type":671,"tag":672,"props":797,"children":798},{},[799],{"type":676,"value":800},"Чтобы увидеть это «в лоб», удобно перечислить все возможные комбинации полов трёх людей, считая, что каждый может быть М или Ж.",{"type":671,"tag":672,"props":802,"children":803},{},[804],{"type":676,"value":805},"Количество исходов: (2^3 = 8).",{"type":671,"tag":807,"props":808,"children":809},"table",{},[810,839],{"type":671,"tag":811,"props":812,"children":813},"thead",{},[814],{"type":671,"tag":815,"props":816,"children":817},"tr",{},[818,824,829,834],{"type":671,"tag":819,"props":820,"children":821},"th",{},[822],{"type":676,"value":823},"№",{"type":671,"tag":819,"props":825,"children":826},{},[827],{"type":676,"value":828},"Исход (по порядку людей)",{"type":671,"tag":819,"props":830,"children":831},{},[832],{"type":676,"value":833},"«Хотя бы двое одного пола»?",{"type":671,"tag":819,"props":835,"children":836},{},[837],{"type":676,"value":838},"Объяснение",{"type":671,"tag":840,"props":841,"children":842},"tbody",{},[843,866,888,909,930,952,974,995],{"type":671,"tag":815,"props":844,"children":845},{},[846,851,856,861],{"type":671,"tag":847,"props":848,"children":849},"td",{},[850],{"type":676,"value":45},{"type":671,"tag":847,"props":852,"children":853},{},[854],{"type":676,"value":855},"МММ",{"type":671,"tag":847,"props":857,"children":858},{},[859],{"type":676,"value":860},"Да",{"type":671,"tag":847,"props":862,"children":863},{},[864],{"type":676,"value":865},"Трое мужчин",{"type":671,"tag":815,"props":867,"children":868},{},[869,874,879,883],{"type":671,"tag":847,"props":870,"children":871},{},[872],{"type":676,"value":873},"2",{"type":671,"tag":847,"props":875,"children":876},{},[877],{"type":676,"value":878},"ММЖ",{"type":671,"tag":847,"props":880,"children":881},{},[882],{"type":676,"value":860},{"type":671,"tag":847,"props":884,"children":885},{},[886],{"type":676,"value":887},"Двое мужчин",{"type":671,"tag":815,"props":889,"children":890},{},[891,896,901,905],{"type":671,"tag":847,"props":892,"children":893},{},[894],{"type":676,"value":895},"3",{"type":671,"tag":847,"props":897,"children":898},{},[899],{"type":676,"value":900},"МЖМ",{"type":671,"tag":847,"props":902,"children":903},{},[904],{"type":676,"value":860},{"type":671,"tag":847,"props":906,"children":907},{},[908],{"type":676,"value":887},{"type":671,"tag":815,"props":910,"children":911},{},[912,917,922,926],{"type":671,"tag":847,"props":913,"children":914},{},[915],{"type":676,"value":916},"4",{"type":671,"tag":847,"props":918,"children":919},{},[920],{"type":676,"value":921},"ЖММ",{"type":671,"tag":847,"props":923,"children":924},{},[925],{"type":676,"value":860},{"type":671,"tag":847,"props":927,"children":928},{},[929],{"type":676,"value":887},{"type":671,"tag":815,"props":931,"children":932},{},[933,938,943,947],{"type":671,"tag":847,"props":934,"children":935},{},[936],{"type":676,"value":937},"5",{"type":671,"tag":847,"props":939,"children":940},{},[941],{"type":676,"value":942},"ЖЖЖ",{"type":671,"tag":847,"props":944,"children":945},{},[946],{"type":676,"value":860},{"type":671,"tag":847,"props":948,"children":949},{},[950],{"type":676,"value":951},"Трое женщин",{"type":671,"tag":815,"props":953,"children":954},{},[955,960,965,969],{"type":671,"tag":847,"props":956,"children":957},{},[958],{"type":676,"value":959},"6",{"type":671,"tag":847,"props":961,"children":962},{},[963],{"type":676,"value":964},"ЖЖМ",{"type":671,"tag":847,"props":966,"children":967},{},[968],{"type":676,"value":860},{"type":671,"tag":847,"props":970,"children":971},{},[972],{"type":676,"value":973},"Двое женщин",{"type":671,"tag":815,"props":975,"children":976},{},[977,982,987,991],{"type":671,"tag":847,"props":978,"children":979},{},[980],{"type":676,"value":981},"7",{"type":671,"tag":847,"props":983,"children":984},{},[985],{"type":676,"value":986},"ЖМЖ",{"type":671,"tag":847,"props":988,"children":989},{},[990],{"type":676,"value":860},{"type":671,"tag":847,"props":992,"children":993},{},[994],{"type":676,"value":973},{"type":671,"tag":815,"props":996,"children":997},{},[998,1003,1008,1012],{"type":671,"tag":847,"props":999,"children":1000},{},[1001],{"type":676,"value":1002},"8",{"type":671,"tag":847,"props":1004,"children":1005},{},[1006],{"type":676,"value":1007},"МЖЖ",{"type":671,"tag":847,"props":1009,"children":1010},{},[1011],{"type":676,"value":860},{"type":671,"tag":847,"props":1013,"children":1014},{},[1015],{"type":676,"value":973},{"type":671,"tag":672,"props":1017,"children":1018},{},[1019],{"type":676,"value":1020},"Во всех 8 случаях условие выполняется, значит вероятность равна (8/8 = 1).",{"type":671,"tag":672,"props":1022,"children":1023},{},[1024],{"type":676,"value":1025},"Дополнительный способ (через противоположное событие):",{"type":671,"tag":765,"props":1027,"children":1028},{},[1029,1034,1039,1044],{"type":671,"tag":769,"props":1030,"children":1031},{},[1032],{"type":676,"value":1033},"Искомое событие: A = «хотя бы двое одного пола».",{"type":671,"tag":769,"props":1035,"children":1036},{},[1037],{"type":676,"value":1038},"Противоположное событие: (\\overline{A}) = «все трое разных полов».",{"type":671,"tag":769,"props":1040,"children":1041},{},[1042],{"type":676,"value":1043},"При двух полах событие «все трое разных полов» невозможно, значит (P(\\overline{A}) = 0).",{"type":671,"tag":769,"props":1045,"children":1046},{},[1047],{"type":676,"value":1048},"Тогда (P(A) = 1 - 0 = 1).",{"type":671,"tag":672,"props":1050,"children":1051},{},[1052],{"type":676,"value":1053},"Схема (идея «ящиков и шаров»):",{"type":671,"tag":765,"props":1055,"children":1056},{},[1057,1075],{"type":671,"tag":769,"props":1058,"children":1059},{},[1060,1062,1068,1070],{"type":676,"value":1061},"Ящики: ",{"type":671,"tag":1063,"props":1064,"children":1065},"span",{},[1066],{"type":676,"value":1067},"М",{"type":676,"value":1069},", ",{"type":671,"tag":1063,"props":1071,"children":1072},{},[1073],{"type":676,"value":1074},"Ж",{"type":671,"tag":769,"props":1076,"children":1077},{},[1078],{"type":676,"value":1079},"Шары: человек1, человек2, человек3\nТри шара не могут разложиться по двум ящикам так, чтобы в каждом ящике было не больше одного шара.",{"data":1081,"body":1082},{},{"type":668,"children":1083},[1084,1089,1101],{"type":671,"tag":672,"props":1085,"children":1086},{},[1087],{"type":676,"value":1088},"Моделирование (Монте‑Карло) не является строгим доказательством, но хорошо показывает, что частота успеха стремится к 1.",{"type":671,"tag":1090,"props":1091,"children":1095},"pre",{"className":1092,"code":1094,"language":676},[1093],"language-text","function trial() {\n  // 0 = М, 1 = Ж\n  const a = Math.random() \u003C 0.5 ? 0 : 1\n  const b = Math.random() \u003C 0.5 ? 0 : 1\n  const c = Math.random() \u003C 0.5 ? 0 : 1\n\n  // событие \"хотя бы двое одного пола\"\n  return (a === b) || (a === c) || (b === c)\n}\n\nfunction simulate(N = 1_000_000) {\n  let ok = 0\n  for (let i = 0; i \u003C N; i++) {\n    if (trial()) ok++\n  }\n  return ok / N\n}\n\nconsole.log(simulate())\n",[1096],{"type":671,"tag":733,"props":1097,"children":1099},{"__ignoreMap":1098},"",[1100],{"type":676,"value":1094},{"type":671,"tag":672,"props":1102,"children":1103},{},[1104],{"type":676,"value":1105},"Ожидаемый результат: число очень близкое к 1 (иногда будет выводиться ровно 1 из‑за того, что событие всегда истинно при данной логике проверки).",{"data":1107,"body":1108},{},{"type":668,"children":1109},[1110],{"type":671,"tag":672,"props":1111,"children":1112},{},[1113,1115,1121,1123,1129],{"type":676,"value":1114},"Даже если в симуляции изменить вероятность рождения/появления мужчин и женщин с ",{"type":671,"tag":733,"props":1116,"children":1118},{"className":1117},[],[1119],{"type":676,"value":1120},"0.5",{"type":676,"value":1122}," на любое другое значение (например, ",{"type":671,"tag":733,"props":1124,"children":1126},{"className":1125},[],[1127],{"type":676,"value":1128},"0.6/0.4",{"type":676,"value":1130},"), ответ всё равно останется 1, потому что совпадение следует из количества категорий, а не из конкретных вероятностей.",{"data":1132,"body":1133},{},{"type":668,"children":1134},[1135],{"type":671,"tag":672,"props":1136,"children":1137},{},[1138],{"type":676,"value":39},1775735658923]