Theory of majority decision elements