lunes, 25 de mayo de 2020

Saliendo del tema recurrente

tu no has inventado nada Tinder 1843magazine.com/upfront/rewind en.wikipedia.org/wiki/Gale%E2%8


Gale–Shapley algorithm


In mathematics, economics, and computer science, the Gale–Shapley algorithm (also known as the deferred acceptance algorithm) is an algorithm for finding a solution to the stable matching problem, named for David Gale and Lloyd Shapley. It takes polynomial time, and the time is linear in the size of the input to the algorithm. Depending on how it is used, it can find either the solution that is optimal for the participants on one side of the matching, or for the participants on the other side. It is a truthful mechanism from the point of view of the participants for whom it provides the optimal solution.



Background
Main article: stable matching problem
The stable matching problem, in its most basic form, takes as input equal numbers of two types of participants (n men and n women, or n medical students and n internships, for example), and an ordering for each participant giving their preference for whom to be matched to among the participants of the other type. A matching is not stable if:

There is an element A of the first matched set which prefers some given element B of the second matched set over the element to which A is already matched, and
B also prefers A over the element to which B is already matched.
In other words, a matching is stable when there does not exist any match (A, B) which both prefer each other to their current partner under the matching. A stable matching always exists, and the algorithmic problem solved by the Gale–Shapley algorithm is to find one.

Solution

In 1962, David Gale and Lloyd Shapley proved that, for any equal number of men and women, it is always possible to solve the SMP and make all marriages stable. They presented an algorithm to do so.

The Gale–Shapley algorithm involves a number of "rounds" (or "iterations"):

In the first round, first a) each unengaged man proposes to the woman he prefers most, and then b) each woman replies "maybe" to her suitor she most prefers and "no" to all other suitors. She is then provisionally "engaged" to the suitor she most prefers so far, and that suitor is likewise provisionally engaged to her.
In each subsequent round, first a) each unengaged man proposes to the most-preferred woman to whom he has not yet proposed (regardless of whether the woman is already engaged), and then b) each woman replies "maybe" if she is currently not engaged or if she prefers this man over her current provisional partner (in this case, she rejects her current provisional partner who becomes unengaged). The provisional nature of engagements preserves the right of an already-engaged woman to "trade up" (and, in the process, to "jilt" her until-then partner).
This process is repeated until everyone is engaged.
The runtime complexity of this algorithm is {\displaystyle O(n^{2})}O(n^{2}) where {\displaystyle n}n is the number of men or women.

This algorithm guarantees that:

Everyone gets married

At the end, there cannot be a man and a woman both unengaged, as he must have proposed to her at some point (since a man will eventually propose to everyone, if necessary) and, being proposed to, she would necessarily be engaged (to someone) thereafter.
The marriages are stable
Let Alice and Bob both be engaged, but not to each other. Upon completion of the algorithm, it is not possible for both Alice and Bob to prefer each other over their current partners. If Bob prefers Alice to his current partner, he must have proposed to Alice before he proposed to his current partner. If Alice accepted his proposal, yet is not married to him at the end, she must have dumped him for someone she likes more, and therefore doesn't like Bob more than her current partner. If Alice rejected his proposal, she was already with someone she liked more than Bob.

Algorithm

algorithm stable_matching is

    Initialize all m ∈ M and w ∈ W to free
    while ∃ free man m who still has a woman w to propose to do
        w := first woman on m's list to whom m has not yet proposed
        if w is free then
            (m, w) become engaged
        else some pair (m', w) already exists
            if w prefers m to m' then
                m' becomes free
                (m, w) become engaged
            else
                (m', w) remain engaged
            end if
        end if
    repeat

Optimality of the solution

The existence of different stable matchings raises the question: which matching is returned by the Gale-Shapley algorithm? Is it the matching better for men, for women, or the intermediate one? In the above example, the algorithm converges in a single round on the men-optimal solution because each woman receives exactly one proposal, and therefore selects that proposal as her best choice, ensuring that each man has an accepted offer, ending the match.

This is a general fact: the Gale-Shapley algorithm in which men propose to women always yields a stable matching that is the best for all men among all stable matchings. Similarly, if the women propose then the resulting matching is the best for all women among all stable matchings. These two matchings are the top and bottom elements of a larger structure on all stable matchings, the lattice of stable matchings.

To see this, consider the illustration at the right. Let A be the matching generated by the men-proposing algorithm, and B an alternative stable matching that is better for at least one man, say m0. Suppose m0 is matched in B to a woman w1, which he prefers to his match in A. This means that in A, m0 has visited w1, but she rejected him (this is denoted by the green arrow from m0 to w1). w1 rejected him in favor of some man that she prefers, say m2. So in B, w1 is matched to m0 but "yearns" (wants but unmatched) to m2 (this is denoted by the red arrow from w1 to m2).

Since B is a stable matching, m2 must be matched in B to some woman he prefers to w1, say w3. This means that in A, m2 has visited w3 before arriving at w1, which means that w3 has rejected him. By similar considerations, and since the graph is finite, we must eventually have a directed cycle in which each man was rejected in A by the next woman in the cycle, who rejected him in favor of the next man in the cycle. But this is impossible since such "cycle of rejections" cannot start anywhere: suppose by contradiction that it starts at e.g. m0 - the first man rejected by his adjacent woman (w1). By assumption, this rejection happens only after m2 comes to w1. But this can happen only after w3 rejects m2 - contradiction to m0 being the first.

Strategic considerations

The GS algorithm is a truthful mechanism from the point of view of men (the proposing side). I.e, no man can get a better matching for himself by misrepresenting his preferences. Moreover, the GS algorithm is even group-strategy proof for men, i.e., no coalition of men can coordinate a misrepresentation of their preferences such that all men in the coalition are strictly better-off. However, it is possible for some coalition to misrepresent their preferences such that some men are better-off and the other men retain the same partner.

The GS algorithm is non-truthful for the women (the reviewing side): each woman may be able to misrepresent her preferences and get a better match.

Implementation in software packages

R: The Gale–Shapley algorithm (also referred to as deferred-acceptance algorithm) for the stable marriage and the hospitals/residents problem is available as part of the matchingMarkets and matchingR packages.
API: The MatchingTools API provides a free application programming interface for the Gale–Shapley algorithm.
Python: The Gale–Shapley algorithm is included along with several others for generalized matching problems in the QuantEcon/MatchingMarkets.py package
MATLAB: The Gale–Shapley algorithm is implemented in the assign2DStable function that is part of the United States Naval Research Laboratory's free Tracker Component Library.

viernes, 22 de mayo de 2020

Cuarentena y Tomaestados

Estamos en cuarenta, nadie salvo lo liberado puede salir o pudo salir, ahora bien, que es lo liberado? aquello esencial, pongamos los medicos y lo afectado al sistema de salud, obvio, alimentacion, obvio, transporte, parte obvio

Ahora bien, LOS TOMAESTADOS????????????  saben que es? el sr que pasa medidor de luz y medidor de gas y anota cuanto se consumio

Dejense de joder con la cuarentena si los TOMAESTADOS son personal esencial


martes, 19 de mayo de 2020

Algo tan inglés como la clase y la raza

Siempre digo que los ingleses adelantan las cosas que van a pasar, ya sea en tecnologia como en economia y algunas otras (Beveridge por ejemplo)

Asi que el titulo del post implica

Los padres de clase media y alta, con ahorros y niñeras, no quieren enviar aún a los niños al colegio; los de clase trabajadora, si

y en el texto, un poco de sociologia y epidemilogia barata

Durante la gripe española de hace un siglo, los médicos franceses descubrieron para su sorpresa que el mayor número de víctimas se registraba en los elegantes bulevares de París. Un auténtico enigma, hasta que se dieron cuenta de que los muertos no eran los señores que se desplazaban por la ciudad en sus carruajes y contemplaban la enfermedad desde la altura de los balcones de sus fabulosos pisos, sino sus sirvientes. Las enfermedades siempre han sido muy respetuosas con las nociones de clase y de raza.
El coronavirus no es ninguna excepción en Inglaterra, donde el clasismo y el racismo prevalecen en el siglo XXI, hasta el punto de que el setenta por ciento de los ministros del gabinete de Boris Johnson han ido a colegios privados (de los que los niños salen con un acento diferente al de las clases trabajadoras), y casi la mitad son licenciados por Oxford y Cambridge. Paralelamente, la inmensa mayoría de actuaciones policiales para llamar la atención por incumplir las reglas del confinamiento se registran en barrios pobres y de mayorías asiáticas y afrocaribeñas.
Raza y clase. También en el debate sobre si las guarderías y las escuelas primarias deben empezar a abrir el 1 de junio, como indica el calendario del gobierno Johnson, o convendría esperar más a ver cómo evoluciona la pandemia, a que se sepa más sobre el comportamiento de la enfermedad, a que el sistema sanitario disponga de la capacidad para testar y localizar los contactos de quienes se infecten. Qué casualidad, los padres de clase media y alta (con más recursos económicos y capacidad de teletrabajar y contratar niñeras) optan por la prudencia, y los de clase trabajadora (que necesitan volver a ganar dinero y no tener que ocuparse de los niños) apuestan por la reapertura de las aulas.

Aca tenemos un piquetero de Hyde Park, mas mejor no puede ser, observese la diferencia de la poli y el tipo (lo que tiene raro es la camisa fuera, desprolijo el)
En un país como el Reino Unido fracturado ya territorialmente (Inglaterra por un lado, y Escocia, Gales e Irlanda del Norte por otro), generacionalmente (jóvenes y mayores), entre el campo y la ciudad y por el Brexit, ahora se suma la división por si los niños pequeños han de volver a clase antes del verano.
y la nota sigue, no tiene desperdicio



domingo, 17 de mayo de 2020

Pasaportes Internos, aka el uso de SUBE para discriminar en viajes



Escuchando radio esta mañana aparecio la noticia que se iba a usar la SUBE para permitir o no a los viajeros internos el uso de medios publicos, esto, sumado a los controles en AMBA y otros lados me hizo acordar al:

Sistema de pasaportes zarista

El sistema de pasaportes tenía vigencia en la zarista Rusia pre-revolucionaria, con objeto de solo permitir el traslado de personas autorizadas fuera de una zona determinada. De esa forma, la libre circulación no estaba permitida, se circunscribía una población a una zona determinada.

Luego, los comunistas lo derogaron, un tiempo, Uds sabran, no hay pero comisario que un progre, Stalin lo hizo, recuerdo la, quizas, frase apocrifa de Kicillof diciendo que el comunismo fracaso por que no tenia Excel

Reposicion

El 27 de diciembre de 1932, el Comité Ejecutivo Central de la URSS y el Sovnarkom emiten un Decreto Sobre el establecimiento de un Sistema Unificado de Pasaportes dentro de la URSS y la Obligatoria Propiska de los Pasaportes. El propósito declarado fue llevar a cabo un registro de la población de diversos asentamientos urbanos, para expulsar de los pueblos a aquellas personas no implicadas en trabajos industriales o de utilidad social, y limpiar los pueblos de kuláks ocultos, criminales, y otros elementos antisociales[cita requerida]. Con los kuláks ocultos se refería a campesinos fugitivos que trabaron de huir de la colectivización en la Unión Soviética. “Expulsar” normalmente implicaba cierta forma de trabajos forzados[cita requerida]. Los pasaportes fueron introducidos para los residentes urbanos, los campesinos (pertenecientes a las granjas estatales, sovjozniks) y los trabajadores de las novostroykas (новостройка: gran obra pública). Los campesinos de las granjas colectivas (koljoz) y los granjeros individuales no tenían derecho al pasaporte, y por lo tanto, no podían moverse de sus pueblos sin un permiso específico. La reiteración de faltas a este sistema, se consideraba un delito criminal.

Se desarrolla el sistema con el decreto del Sovnarkom de la URSS de 28 de abril de 1933 Sobre la emisión de pasaportes a los ciudadanos de la URSS en territorio de la URSS. La tenencia del pasaporte, con la obligación de tener la propiska, se establece como obligatoria para los ciudadanos desde los 16 años y residentes en:

Ciudades, pueblos y asentamientos urbanos de trabajadores
Dentro del radio de 100 kilómetros de Moscú y Leningrado
Dentro del radio de 50 kilómetros de Járkov, Kiev, Minsk, Rostov del Don y Vladivostok
Dentro de los 100 kilómetros a lo largo de la frontera occidental de la URSS
Dentro de estos territorios, era el único documento personal válido. De acuerdo con el punto 2 de dicho decreto, a los residentes en localidades rurales se les prohibía taxativamente la concesión del pasaporte.





El 10 de septiembre de 1940, el Sovnarkom de la URSS emite el decreto del Estatuto del Pasaporte (Положение о паспортах, Polozhénye o pasportaj). Recoge un tratamiento especial para la propiska en capitales de las repúblicas, de los krais y óblast, así como en áreas fronterizas e importantes nudos ferroviarios.

El 21 de octubre de 1953, el Consejo de Ministros de la URSS emite el decreto del nuevo Estatuto del Pasaporte. Lo hace obligatorio para todos los ciudadanos mayores de 16 años en todas las poblaciones no-rurales. Los residentes rurales no podían abandonar su lugar de residencia por más de 30 días, e incluso para esto necesitaban un permiso del Selsoviet (Sóviet rural). Se introduce el concepto de propiska temporal distinto a la regular o permanente. La propiska temporal se emitía por razones relativas al trabajo o estudios lejos de la residencia.

El 28 de agosto de 1974, el Consejo de Ministros de la URSS emite un nuevo Estatuto del Sistema de Pasaportes de la URSS y las normas para la propiska. Las últimas normas estuvieron en vigor hasta el 23 de octubre de 1995.

https://web.archive.org/web/20121119024730/http://magazines.russ.ru/novyi_mi/1996/6/popov.html

https://web.archive.org/web/20080515221911/http://www.fmsrf.ru/5.asp

de wiki tambien obvio


viernes, 8 de mayo de 2020

Tarifas, facturas, servicios publicos, etc

Esto formo parte de un mail, pero la verdad, merece publicarse

Como caminaron al gobierno las electricas y gasiferas con la facturacion, como siempre, el infierno esta en los detalles (el agua etc creeria lo mismo, y las electricas pciales se hacen los giles, son la caja)

y pasaran estas cosas, entre otras

a) Te devuelvo lo que pagaste de mas, los financieros de esas empresas de parabienes, el usuario adelanto plata gratis

b) Te lo devuelvo en Kw o m3, con precios por el piso, los financieros de esas empresas de parabienes, el Kw/m3 o lo subo en $ con lo cual son menos elementos fisicos, o no lo subo con lo cual aumenta el estado su subsidio

c) Nada dice de cobrar o no el derecho de reconexion, en ambos casos la reglamentacion es explicita, te lo van a cobrar, y si el regulador dice no, el estado lo pagara.

Y asi detalles que se transformaran en una bola de plata, como en Argentina normalmente el regulador esta cooptado por los regulados (o medio, o un cuarto o), se van a encontrar con cosas de esas por doquier, compremos pochoclo.

martes, 14 de abril de 2020

Esto va a ser para kilombo

Lo de Taiwan, avisando y pareceria ser la WHO tapando, y esto, va a generar quizas una cadena de sucesos no muy lindos (no quiero imaginar el Roosevelt en Guam)

Pero leamos

de:





State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses


April 14, 2020 at 7:00 a.m. GMT-3


Two years before the novel coronavirus pandemic upended the world, U.S. Embassy officials visited a Chinese research facility in the city of Wuhan several times and sent two official warnings back to Washington about inadequate safety at the lab, which was conducting risky studies on coronaviruses from bats. The cables have fueled discussions inside the U.S. government about whether this or another Wuhan lab was the source of the virus — even though conclusive proof has yet to emerge.

In January 2018, the U.S. Embassy in Beijing took the unusual step of repeatedly sending U.S. science diplomats to the Wuhan Institute of Virology (WIV), which had in 2015 become China’s first laboratory to achieve the highest level of international bioresearch safety (known as BSL-4). WIV issued a news release in English about the last of these visits, which occurred on March 27, 2018. The U.S. delegation was led by Jamison Fouss, the consul general in Wuhan, and Rick Switzer, the embassy’s counselor of environment, science, technology and health. Last week, WIV erased that statement from its website, though it remains

What the U.S. officials learned during their visits concerned them so much that they dispatched two diplomatic cables categorized as Sensitive But Unclassified back to Washington. The cables warned about safety and management weaknesses at the WIV lab and proposed more attention and help. The first cable, which I obtained, also warns that the lab’s work on bat coronaviruses and their potential human transmission represented a risk of a new SARS-like pandemic.



“During interactions with scientists at the WIV laboratory, they noted the new lab has a serious shortage of appropriately trained technicians and investigators needed to safely operate this high-containment laboratory,” states the Jan. 19, 2018, cable, which was drafted by two officials from the embassy’s environment, science and health sections who met with the WIV scientists. (The State Department declined to comment on this and other details of the story.)

The Chinese researchers at WIV were receiving assistance from the Galveston National Laboratory at the University of Texas Medical Branch and other U.S. organizations, but the Chinese requested additional help. The cables argued that the United States should give the Wuhan lab further support, mainly because its research on bat coronaviruses was important but also dangerous.






https://www.washingtonpost.com/opinions/2020/04/14/state-department-cables-warned-safety-issues-wuhan-lab-studying-bat-coronaviruses/                                                                                                                                                                                                                                                 2/12

14/4/2020                                 State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses - The Washington Post

As the cable noted, the U.S. visitors met with Shi Zhengli, the head of the research project, who had been publishing studies related to bat coronaviruses for many years. In November 2017, just before the U.S. officials’ visit, Shi’s team had published research showing that horseshoe bats they had collected from a cave in Yunnan province were very likely from the same bat population that spawned the SARS coronavirus in 2003.


“Most importantly,” the cable states, “the researchers also showed that various SARS-like coronaviruses can interact with ACE2, the human receptor identified for SARS-coronavirus. This finding strongly suggests that SARS-like coronaviruses from bats can be transmitted to humans to cause SARS-like diseases. From a public health perspective, this makes the continued surveillance of SARS-like coronaviruses in bats and study of the animal-human interface critical to future emerging coronavirus outbreak prediction and prevention.”

The research was designed to prevent the next SARS-like pandemic by anticipating how it might emerge. But even in 2015, other scientists questioned whether Shi’s team was taking unnecessary risks. In October 2014, the U.S. government had imposed a moratorium on funding of any research that makes a virus more deadly or contagious, known as “gain-of-function” experiments.



https://www.washingtonpost.com/opinions/2020/04/14/state-department-cables-warned-safety-issues-wuhan-lab-studying-bat-coronaviruses/                                                                                                                                                                                                                                                 3/12

14/4/2020                                 State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses - The Washington Post

As many have pointed out, there is no evidence that the virus now plaguing the world was engineered; scientists largely agree it came from animals. But that is not the same as saying it didn’t come from the lab, which spent years testing bat coronaviruses in animals, said Xiao Qiang, a research scientist at the School of Information at the University of California at Berkeley.




“The cable tells us that there have long been concerns about the possibility of the threat to public health that came from this lab’s research, if it was not being adequately conducted and protected,” he said.

There are similar concerns about the nearby Wuhan Center for Disease Control and Prevention lab, which operates at biosecurity level 2, a level significantly less secure than the level-4 standard claimed by the Wuhan Insititute of Virology lab, Xiao said. That’s important because the Chinese government still refuses to answer basic questions about the origin of the novel coronavirus while suppressing any attempts to examine whether either lab was involved.




https://www.washingtonpost.com/opinions/2020/04/14/state-department-cables-warned-safety-issues-wuhan-lab-studying-bat-coronaviruses/                                                                                                                                                                                                                                                 4/12

14/4/2020                                 State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses - The Washington Post

Sources familiar with the cables said they were meant to sound an alarm about the grave safety concerns at the WIV lab, especially regarding its work with bat coronaviruses. The embassy officials were calling for more U.S. attention to this lab and more support for it, to help it fix its problems.




“The cable was a warning shot,” one U.S. official said. “They were begging people to pay attention to what was going on.”

No extra assistance to the labs was provided by the U.S. government in response to these cables. The cables began to circulate again inside the administration over the past two months as officials debated whether the lab could be the origin of the pandemic and what the implications would be for the U.S. pandemic response and relations with China.


https://www.washingtonpost.com/opinions/2020/04/14/state-department-cables-warned-safety-issues-wuhan-lab-studying-bat-coronaviruses/                                                                                                                                                                                                                                                 5/12

14/4/2020                                 State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses - The Washington Post

Inside the Trump administration, many national security officials have long suspected either the WIV or the Wuhan Center for Disease Control and Prevention lab was the source of the novel coronavirus outbreak. According to the New York Times, the intelligence community has provided no evidence to confirm this. But one senior administration official told me that the cables provide one more piece of evidence to support the possibility that the pandemic is the result of a lab accident in Wuhan.




“The idea that is was just a totally natural occurrence is circumstantial. The evidence it leaked from the lab is circumstantial. Right now, the ledger on the side of it leaking from the lab is packed with bullet points and there’s almost nothing on the other side,” the official said.

As my colleague David Ignatius noted, the Chinese government’s original story — that the virus emerged from a seafood market in Wuhan — is shaky. Research by Chinese experts published in the Lancet in January showed the first known patient, identified on Dec. 1, had no connection to the market, nor did more than one-third of the cases in the first large cluster. Also, the market didn’t sell bats.




https://www.washingtonpost.com/opinions/2020/04/14/state-department-cables-warned-safety-issues-wuhan-lab-studying-bat-coronaviruses/                                                                                                                                                                                                                                                 6/12

14/4/2020                                 State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses - The Washington Post

Shi and other WIV researchers have categorically denied this lab was the origin for the novel coronavirus. On Feb. 3, her team was the first to publicly report the virus known as 2019-nCoV was a bat-derived coronavirus.




The Chinese government, meanwhile, has put a total lockdown on information related to the virus origins. Beijing has yet to provide U.S. experts with samples of the novel coronavirus collected from the earliest cases. The Shanghai lab that published the novel coronavirus genome on Jan. 11 was quickly shut down by authorities for “rectification.” Several of the doctors and journalists who reported on the spread early on have disappeared.

On Feb. 14, Chinese President Xi Jinping called for a new biosecurity law to be accelerated. On Wednesday, CNN reported the Chinese government has placed severe restrictions requiring approval before any research institution publishes anything on the origin of the novel coronavirus.

  

https://www.washingtonpost.com/opinions/2020/04/14/state-department-cables-warned-safety-issues-wuhan-lab-studying-bat-coronaviruses/                                                                                                                                                                                                                                                 7/12

14/4/2020                                 State Department cables warned of safety issues at Wuhan lab studying bat coronaviruses - The Washington Post

The origin story is not just about blame. It’s crucial to understanding how the novel coronavirus pandemic started because that informs how to prevent the next one. The Chinese government must be transparent and answer the questions about the Wuhan labs because they are vital to our scientific understanding of the virus, said Xiao.


  
We don’t know whether the novel coronavirus originated in the Wuhan lab, but the cable pointed to the danger there and increases the impetus to find out, he said.

“I don’t think it’s a conspiracy theory. I think it’s a legitimate question that needs to be investigated and answered,” he said. “To understand exactly how this originated is critical knowledge for preventing this from happening in the future.” 

Overlord

Overlord es el nombre de fantasia del desembarco de Normandia en 1944, una de las mayores cosas de logistica de todos los tiempos.

Eso me hace acordar a alguna cosa que alguna vez lei, en la guerra los aficionados hacen la tactica, los profesionales, la logistica.

A que va esto?

Estamos con una pandemia que afecta a la gente mayor, que es la que morira en mas porcentaje y es la de mas riesgo.

Alguien tuvo en cuenta la logistica?

NADIE