Tuesday, October 31, 2006

Extreme Diet Coke & Mentos Experiments II - The Domino Effect

The guys from EepyBird are back, with 251 bottles of Diet Coke and over 1,500 Mentos mints. In Experiment #137, they did a mint-powered version of the Bellagio fountains. This time, it's one giant Coke & Mentos chain reaction that has to be seen to be believed. Keywords: eepybird eepy bird mentos coke diet coke mentos experiment fountain soda science geyser experiments fountains geysers

Monday, October 30, 2006

Занимательная задача: 100 заключенных и 2 миски

Еще занимательная задача о 100 заключенных и сумасшедшем начальнике тюрьмы :-).

В тюрьме содержатся 100 заключенных. Начальник собирается провести с ними следующий эксперимент. Каждый день один заключенный приводится в особую комнату. В ней есть две полки (верхняя и нижняя), на которых стоит две миски, красная и синяя. Зайдя в комнату, заключенный должен переставить одну из мисок (любую, по своему выбору) на другую полку. Начальное положение мисок неизвестно. Порядок вызова заключенных неизвестен, но начальник гарантирует, что рано или поздно любой заключенный побывает в комнате сколь угодно много раз. Задача заключенных: кто-то из них должен объявить, что уже все побывали в комнате хотя бы по одному разу. Если он угадал - все освобождаются. Перед началом эксперимента заключенные могут договориться о стратегии, но после начала они не общаются. Как заключенным освободиться?

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

Есть множество приборов, часть которых исправна, а часть неисправна. Приборы умеют тестировать друг друга. Для тестирования приборы подключаются друг к другу и каждый сообщает про другого, исправен ли тот. При этом исправный прибор всегда верно диагностирует любой другой прибор, а неисправный выдает произвольный результат: иногда он выдаст верный диагноз, а иногда неверный. Задача:
  1. При условии, что исправных приборов больше половины, установить, какие приборы верные.
  2. Доказать, что если исправных приборов половина или меньше, то невозможно определить, какие приборы верные.

Задача рассказана мне Г.М. Фельдманом.

Wednesday, October 25, 2006

Занимательная задача: два шарика

Есть дом в 100 этажей и два одинаковых стеклянных шарика. Ясно, что если сбросить шарик с досточно высокого этажа, он разобьется. Задача: при помощи имеющихся двух шариков найти минимальный этаж, с которого шарик разобъется, совершив при этом минимальное число бросаний. При этом если шарик не разбился, его можно поднять и бросать еще раз, а если разбился - то шарика больше нет.

Задача рассказана мне Г.М. Фельдманом

Занимательная задача: подсчет в темноте

По периметру круглого складского помещения расставлено много одинаковых контейнеров. На каждом мелом написан какой-то номер. Номера идут в произвольном порядке и могут повторяться. На складе темно, но у нас есть фонарик, который может осветить только один контейнер, рядом с которым мы находимся. Мы можем произвольно перемещаться по складу. Подойдя к контейнеру, мы может стереть имеющийся на нем номер и написать любой другой.

В этих условиях нам надо посчитать, сколько контейнеров есть на складе. Как это сделать?

Задача рассказана мне Г.М. Фельдманом

Tuesday, October 24, 2006

Занимательная задача: 100 заключенных

В тюрьме содержится 100 заключенных. Начальник тюрьмы решил провести над ними следующий эксперимент. Заключенным сообщают, что завтра их всех выстроят на тюремном дворе в колонну по одному. Каждому на голову будет надет колпак, на котором сзади написан произвольный номер от 1 до 100 (номера идут в произвольном порядке и могут повторяться). Т.о. каждый заключенный видит номера коллег, стоящих в колонне впереди него, но не видит свой и тех, кто стоит за ним. Последнему в колонне заключенному предложат угадать свой номер, и он должен назвать вслух свое предположение. Затем то же должен сделать второй с конца и т.д. вплоть до первого в колонне. Тот, кто угадал свой номер, выходит на свободу. Перед началом эксперимента заключенные могут договориться о совместной стратегии.

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

Задача рассказана мне Г.М. Фельдманом

Monday, October 23, 2006

More NetBIOS woes

A Windows XP computer in our network exhibited a strange problem. It could connect to a network share via remote server's NetBIOS name (e.g. \\server\share), but not fully-qualified DNS name (e.g. \\server.domain.com\share). This had all sorts of interesting consequences. For one, group policy failed to apply to this computer, because it needs to access the group policy files on the domain controller's SYSVOL share via the domain's DNS name. The event log showed an error like this: "Windows cannot access the file gpt.ini for GPO CN={Policy GUID},CN=Policies,CN=System,DC=domain,DC=com The file must be present at the location \\domain.com\Policies\{Policy GUID} (Network path not found) Group Policy processing aborted". Of course it was failing because it could not access the domain controller via the \\domain.com DNS name. This group policy failure in turn prevented the computer from receiving updates from the local WSUS server, and so on.

As it turned out, the problem was that TCP/IP NetBIOS Helper Service was not running. Starting the service resolved the problem. Once again, NetBIOS is a must.

A particularly bad thing about the TCP/IP NetBIOS Helper Service is that one cannot force it to start via group policy. If the service is not running on a computer, group policy will not apply to this computer, as my example demonstrates.

Thursday, October 05, 2006

Installing Windows Server Update services (WSUS)

I've installed WSUS in my company's network. Right now it's being tested by a limited number of users, but things seem to run well. Installation and configuration is easy, and fully described in Deployment and Operations guides from Microsoft. A couple of things the guides didn't mention, though. First, I had to install this hotfix on the WSUS server computer, otherwise clients failed to update. Second, Automatic Updates (wuauserv) service as well as Background Intelligent Transfer Service (BITS) must be running on all client computers that update from a WSUS service. The former sounds obvious yet is easy to overlook, and BITS even less obvious for a new user of WSUS. An good way to ensure that the required services are running is through Group Policy. Since Microsoft recommends that WSUS settings are set in a separate GPO, and not in the Default Domain Policy, this WSUS GPO is a good place to configure Automatic Updates service to autostart (although one can do it in any other GPO as well). To do so, open this GPO in Group Policy Object Editor, and navigate to Computer Configuration - Windows Settings - Security Settings - System Services. Locate Automatic Updates services in the list, double-click and set the "Service startup mode" to automatic, like this:

Caveat: you also need to configure services security (the Security dialog pops up automatically). Here make sure to add "Authenticated Users" group with Read permission like this:

If you fail to do so, the Automatic Updates service will fail to start with "Error 0x80004015: The class is configured to run as a security id different from the caller". This is discussed in detail here. Repeat these steps for the Background Intelligent Transfer Service (BITS).

On a related note, in order to test WSUS with a limited number of computers I employed the following approach. As Microsoft guides recommend, I created a separate WSUS policy GPO with WSUS settings in Group Policy Management Console. I linked it to the top-level domain, but using the Security Filtering feature I specified that it only applies to a few selected computers. Once testing is successfully, I will replace this list of computers with "Authenticated Users" group so that the policy applies to all.