text
stringlengths
14
5.77M
meta
dict
__index_level_0__
int64
0
9.97k
{"url":"https:\/\/www.yaclass.in\/p\/mathematics-cbse\/class-7\/comparing-quantities-1490\/percentage-application-2413\/re-3a1595cf-9dc3-48ac-b068-7cedbf69d8f6","text":"UPSKILL MATH PLUS\n\nLearn Mathematics through our AI based learning portal with the support of our Academic Experts!\n\nAjay bought a book\u00a0for $$\u20b9$$1342 and sold it\u00a0with a\u00a020\u00a0$$\\%$$ profit.\u00a0Calculate the\u00a0profit amount?\nAjay\u00a0will get\u00a0a profit of $$\u20b9$$.","date":"2022-05-20 13:39:32","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.2261878103017807, \"perplexity\": 7694.075854509269}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2022-21\/segments\/1652662532032.9\/warc\/CC-MAIN-20220520124557-20220520154557-00085.warc.gz\"}"}
null
null
La aconitina es el pseudoalcaloide principal del acónito (Aconitum), de donde proviene su nombre. Tiene la capacidad de abrir los canales de sodio () de las células nerviosas y musculares. Su fórmula es , es soluble en cloroformo o en benceno y ligeramente en alcohol etílico o en éter, y muy poco soluble en agua. Uso terapéutico Ha sido utilizada como medicación antiarrítmica y para combatir neuralgias del trigémino. Toxicidad Exposición Es una sustancia que está presente en los ranúnculos, generalmente con mayor concentración en la raíz o el tallo. La principal fuente de intoxicaciones es Aconitum napellus, que puede contaminar accidentalmente infusiones de hierbas no tóxicas. Bastan 2 mg de sustancia para provocarle la muerte a un ser humano adulto. Fue utilizado por los antiguos chinos como veneno, impregnado en las flechas. La aconitina se absorbe rápidamente a través de las membranas mucosas aunque, al aplicarse externamente, puede absorberse por la piel, provocando intoxicación sistematizada. Sintomatología Pocos minutos después del comienzo de la ingestión de una dosis elevada de aconitina se evidencia parestesia, aparecen luego sensación de anestesia, sudoración profusa y enfriamiento del cuerpo, náuseas, vómitos y otros síntomas similares. A veces hay dolor intenso, acompañado de calambres o diarrea. Se produce sensación de quemadura, entumecimiento y picor de lengua, labios, faringe y manos, visión borrosa, pulso lento y débil con caída de la presión arterial, dolores torácicos, respiración entrecortada, convulsiones y posterior muerte por paro respiratorio o fibrilación ventricular. Tratamiento En vista de que no hay antídoto, el tratamiento suele ser dirigido a los síntomas. Se trata de evacuar el tóxico dando vomitivos y realizando un lavado de estómago. Se indican reposo absoluto y envolturas calientes. Se considera que si el paciente sobrevive a las primeras 24 h, entonces el pronóstico será favorable. Tradicionalmente una intoxicación conocida por aconitina se trata con medicamentos como la atropina, estricnina o barakol, aunque no está claro que alguno de ellos sea efectivo. Algunas otras toxinas, como la tetrodotoxina, que se unen al sitio de destino de la aconitina, pero tienen acciones opuestas, pueden reducir los efectos del veneno, pero son de por sí tan tóxicas que igualmente pueden inducir la muerte del sujeto. Se utiliza digitalina para contrarrestar la depresión miocárdica. Fármacos antiarrítmicos como la lidocaína, usada clínicamente para el tratamiento de ritmos cardíacos inusuales, también bloquea los canales de sodio, sin embargo, solo existe un informe de tratamiento exitoso por intoxicación accidental de aconitina con este medicamento. Para confirmar el diagnóstico de intoxicación de víctimas hospitalizadas, se pueden medir las concentraciones de la sustancia en el suero sanguíneo u orina. Hasta 2008, se han hallado niveles altos en la sangre post mortem de al menos 5 casos fatales. Referencias Alcaloides Toxicología Fármacos en desuso
{ "redpajama_set_name": "RedPajamaWikipedia" }
3,286
Making the World Your Business Playground Published: Feb 12, 2015 Last Updated: Nov 1, 2017 by Shawn Hessinger In Small Business Operations 1 It's shortly after sunrise in Ballard, a residential neighborhood of Seattle, Washington near Puget Sound. Erik Koto, the CEO of QuestionPro, has just awakened. He hasn't even had his morning coffee, but already there's an alert on his mobile phone from the company's website design team. Located in Argentina, the team says the new UI designs are ready for review. Then there's a mobile Skype call with his company's network admin team in India. The call is to confirm bandwidth levels as a QuestionPro customer sends over one million survey invitations through the company's software platform. After a short bike ride to the office, Koto jumps immediately into a series of back-to-back virtual meetings. Using phones, screen sharing and video conferencing, various team members connect on three continents, across 14 time zones, and involve sales, marketing, development and support. And all of this happens before Koto has his English muffin for breakfast. For Koto and his team at QuestionPro, it's just another day. The 50-person technology company provides online survey software to 2.5 million users located in over 100 countries. QuestionPro is among the growing number of micromultinationals. These are businesses that are small in size, but operate globally. And QuestionPro has done so almost from day one of its existence. Small to medium sized companies doing business globally used to be the exception. Today they are becoming the rule. And it's not just in the tech sector. According to Kati Suominen, founder and CEO of TradeUp, an equity crowdfunding platform for globalizing companies, such firms are anything but the exception. In a 2014 report on Suominen's company website, she notes that 98 percent of U.S. exporters are currently small to medium sized firms with 500 or fewer employees. Further, Suominen says the output from these companies accounts for 38 percent of U.S. exports. So, what does it take to operate a company like this? And how is it different from a traditional small business like a coffee shop, retail store, realtor or other local operation? Email Alone Doesn't Cut It For one thing, communication takes on a sense of overriding importance in a global company. And it requires some adjustment. You have to find a way to collaborate across time zones, continents, and cultures, Koto explains in an interview with us. Technology (Skype, phone conferences, video conferences, messaging chats and screen-shares) has made this much easier. But in Koto's opinion, fostering communication is not a challenge that is solved by technology alone. While technology is a great enabler, creating a collaborative global team still comes down to the same basic principles that apply to a small team sitting in the same office. Those principles are (1) being accessible to others on the team, and (2) making the effort to communicate. Fixed office hours can get in the way of communication for a small global team. "You have to make yourself available well beyond 9-to-5," he adds. Never being available during normal business hours in other time zones may be perceived as rude to your team. But what's worse is that it can force all communications to be done using email. "Email alone doesn't cut it," Koto explains. "When you're spread across the globe, there's a natural tendency for team members to fall back on email all the time," Koto says. That's a mistake. "Email is crucial, but also has serious limitations. It slows your team down, because you may have to wait 12 hours for an email response. And then it could be another 12 hours until the person gets your email response back. Whereas, in a voice conversation, you go back and forth in real time. You can ask questions to clarify points and add details, all in the space of five minutes." Using email alone, that process could take five days instead of five minutes, he adds. Accepting Cultural Differences Working cross-culturally poses another set of challenges, Koto admits. Communication styles differ between cultures. Even small talk is different, because not everyone will understand local geography, politics, television shows or cultural references. But he says cultural barriers quickly come down when remembering a few important tips. Take time in each call, even if just for a moment, to put 'business' aside. Ask about local politics, weather, festivals, families and kids. Don't assume everyone cares about your local weather. Don't talk as if everyone understands what's going on in the United States. Instead, ask about their country. Draw them out. Also, crack a joke. You may have heard that humor doesn't translate well, but Koto disagrees. "Humor is the most universal language. Just make sure everyone knows it's a joke," he adds. Finally, whenever you have the chance, get on a plane. Meet people in person. These face-to-face interactions will pay off for months and years to come, Koto says. Going Global: Challenges that Aren't Obvious According to Koto, one of the reasons QuestionPro was able to go global almost from day one, is the type of business it is. "We sell an online product. It's a subscription-based survey software," he explained in the interview. QuestionPro doesn't have a physical product that needs to be shipped to other countries. More importantly, there's also a need for the product that transcends borders. Many companies around the world want and use survey tools. "Our core business model naturally lent itself to expansion beyond our borders," Koto adds. However, even with an online software product, going global is not as easy as it seems. Some of the challenges are not obvious. Responding to sales inquiries and supporting customers across time zones and languages poses special challenges. Being available 24-7 became the crucial issue, QuestionPro discovered. Availability is more than just having a Web platform up and running all the time, according to Koto. It also means a fast response time by both sales and customer satisfaction personnel. So, for example, being able to staff a 24-hour response team out of India to meet customer needs was absolutely necessary to global expansion. Koto says the company 'bootstrapped' its global expansion by starting small. It hired a bare bones global support team at first. Once the QuestionPro team was able to show some success, it became easier to justify expansion of the company's global operations. Koto says the right people are key to a company with global ambitions. This means people who can be trusted to operate in remote offices and who are comfortable with cultural ambiguity. There's no silver bullet here, Koto insists. QuestionPro has found staff overseas through professional referrals, personal friends, and online job boards. The cost savings of off-shoring are well-documented, he adds. But he insists the company benefits from this in other ways too. "Offshore staffing is too often simply viewed as a means of driving down costs. I do not look at our global operations as cost cutting," Koto says. "I view our offshore teams as a means of acquiring great talent, with fresh ideas and perspectives on running a global company." "Put simply, going global is a great growth opportunity," he adds. Koto says the global strategy has helped QuestionPro diversify and minimize risk. It is not excessively exposed to one country's economy or one set of competitors. QuestionPro is doubling down on its global strategy. The company keeps adding new markets, staff, and language support every month. Global analytics and customer intelligence to track acquisition, usage, growth, and retention by market are also areas of investment. Koto says the data gives the company the insight needed to try new things, make adjustments, and ultimately keep investing and expanding globally. Some Final Advice Before taking your business global, Laurel Delaney, global business expert and author of "Exporting: The Definitive to Selling Abroad Profitably" says there are some things to consider. "Going global — entering a new and unfamiliar market — challenges us in a whole new way that can potentially interrupt the viability of a business," Delaney said in an email interview with Small Business Trends. "When reengineering your business from local to global, you must take into consideration … additional laws governing intellectual property, hiring and firing, contracts, and marketing and financial management, as well as settling international disputes. So careful planning is in order." "To achieve true success globally, one must have boundless sensitivity, a rugged constitution and a deep capacity for emotional and intellectual curiosity," adds Delaney. Images: QuestionPro More in: QuestionPro 1 Comment ▼ Should Your Small Business Just Ignore These 7 Technologies? Why Analytics Are the Hot Topic at This Small Business Conference Is Your Business Making One of These WordPress Mistakes? Business Etiquette Still Matters in a Casual New Business World How to Pick the Best Business Partner for You Shawn Hessinger Shawn Hessinger is the Executive Editor for Small Business Trends and a professional journalist with more than 20 years experience in traditional and digital media for trade publications and news sites. He is a member of the Society of Professional Journalists and has served as a beat reporter, columnist, editorial writer, bureau chief and managing editor for the Berks Mont Newspapers. One Reaction Always study your market if you plan to go global. Cultures are different and some people will not accept your product in the same way. you have to study their lifestyle and ask for their feedback to know if your product will work in their area. 11 Cash App Scams to Watch Out For The Best Work Boots for Men in 2023 20 Out of Office Message Examples to Inspire You 10 eBay Motors Scams to Watch Out For
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
2,407
Q: How to capture windows 10/windows 11 advanced display settings for multiple monitors I am trying to capture the following displays information connected to my laptop programatically using powershell but I am unable to find a way. This information can be found via the windows GUI at Settings > Display > Advanced Display Information (2 screenshots attached below). Here's the information I am trying to capture Display Name: (In this case, display name for internal would be but the external one would be "ASUS VP 228) Display Resolution: 1680x1050 and 1920x1080 for the 2 displays Whether it's an internal/external display: True and False Refresh rate: 60Hz and 60Hz Here's what I've tried Get-WmiObject win32_videocontroller Returns the resolution under parameter VideoModeDescription but even then, it seems to return the value of "Active Signal Resolution" (from the screenshot) below). Get-WmiObject Win32_Desktopmonitor DeviceID : DesktopMonitor1 DisplayType : MonitorManufacturer : (Standard monitor types) Name : Generic PnP Monitor ScreenHeight : ScreenWidth : Only get output information for 1 out of the 2 monitors and don't get ScreenHeight or ScreenWidth` values. get-ciminstance -namespace root\wmi -classname wmimonitorbasicdisplayparams Active : True DisplayTransferCharacteristic : 120 InstanceName : DISPLAY\IVO8C66\5&462698&0&UID256_0 MaxHorizontalImageSize : 31 MaxVerticalImageSize : 17 SupportedDisplayFeatures : WmiMonitorSupportedDisplayFeatures VideoInputType : 1 PSComputerName : Active : True DisplayTransferCharacteristic : 120 InstanceName : DISPLAY\ACI22C3\5&462698&0&UID265_0 MaxHorizontalImageSize : 48 MaxVerticalImageSize : 27 SupportedDisplayFeatures : WmiMonitorSupportedDisplayFeatures VideoInputType : 1 PSComputerName Gives me the correct monitor count but doesn't give me any other information. I then tried using the DumpEDID tool and it gave me more information but didn't give me current monitor resolution or whether it's an internal display or not. DumpEDID v1.07 Copyright (c) 2006 - 2018 Nir Sofer Web site: http://www.nirsoft.net ***************************************************************** Active : Yes Registry Key : DISPLAY\ACI22C3\5&462698&0&UID265 Monitor Name : ASUS VP228 Serial Number : G6LMTF155938 Manufacture Week : 26 / 2016 ManufacturerID : 26884 (0x6904) ProductID : 8899 (0x22C3) Serial Number (Numeric) : 155938 (0x00026122) EDID Version : 1.3 Display Gamma : 2.20 Vertical Frequency : 50 - 75 Hz Horizontal Frequency : 24 - 83 KHz Maximum Image Size : 48 X 27 cm (21.7 Inch) Maximum Resolution : 1920 X 1080 Support Standby Mode : No Support Suspend Mode : No Support Low-Power Mode : Yes Support Default GTF : No Digital : Yes Supported Display Modes : 720 X 400 70 Hz 640 X 480 60 Hz 640 X 480 67 Hz 640 X 480 72 Hz 640 X 480 75 Hz 800 X 600 56 Hz 800 X 600 60 Hz 800 X 600 72 Hz 800 X 600 75 Hz 832 X 624 75 Hz 1024 X 768 60 Hz 1024 X 768 70 Hz 1024 X 768 75 Hz 1280 X 720 60 Hz 1152 X 864 75 Hz 1280 X 960 60 Hz 1440 X 900 60 Hz 1280 X 1024 60 Hz 1280 X 1024 75 Hz 1680 X 1050 60 Hz 1920 X 1080 60 Hz ***************************************************************** ***************************************************************** Active : Yes Registry Key : DISPLAY\IVO8C66\5&462698&0&UID256 Manufacture Week : 0 / 2019 ManufacturerID : 53030 (0xCF26) ProductID : 35942 (0x8C66) Serial Number (Numeric) : 0 (0x00000000) EDID Version : 1.4 Display Gamma : 2.20 Maximum Image Size : 31 X 17 cm (13.9 Inch) Maximum Resolution : 1920 X 1080 Support Standby Mode : No Support Suspend Mode : No Support Low-Power Mode : No Support Default GTF : No Digital : Yes Supported Display Modes : 1920 X 1080 60 Hz The script here gives me almost what I want except it doesn't give me the monitor name nor does it give me information whether it's internal or not. I have attached 2 screenshots from the Settings > Display > Advanced Display page which is the information I am looking to capture.
{ "redpajama_set_name": "RedPajamaStackExchange" }
5,130
/* * (c) 2018 Apollo Project Developers * <types.h> - Hardware Abstraction Layer * * Includes all of the builtin types * Also defines null */ #ifndef __TYPES_H #define __TYPES_H #include <stdint.h> #include <stdbool.h> #include <stddef.h> #undef NULL #define NULL 0 typedef size_t phys_addr_t; typedef phys_addr_t resource_type_t; #endif
{ "redpajama_set_name": "RedPajamaGithub" }
8,448
define(['angular'], function(angular) { var DefinitionCtrl = [ '$scope', '$routeParams', 'camundaService', 'Views', 'page', 'search', 'breadcrumbTrails', 'dataDepend', function($scope, $routeParams, camundaService, Views, page, search, breadcrumbTrails, dataDepend) { 'use strict'; // create data depend item & store for sub-scopes var caseData = $scope.caseData = dataDepend.create($scope); /* * Single definition display */ // only load if case definition id is selected. if ($routeParams.caseDefinitionId) { /* * Providers */ caseData.provide('definition', [ function() { // load the case definition return camundaService.caseDefinition($routeParams.caseDefinitionId); } ]); caseData.provide('instances', [ 'definition', function(definition) { // load the case definition return camundaService.caseInstances(definition.key, definition.id); } ]); caseData.provide('definitionsByKey', [ 'definition', function(definition) { return camundaService.caseDefinitions(false, definition.key); } ]); caseData.provide('instances.all', [ 'definition', function(definition) { return camundaService.caseInstanceCountByKey(definition.key); } ]); caseData.provide('instances.current', [ 'definition', function(definition) { return camundaService.caseInstanceCount(definition.id); } ]); caseData.provide('definitionDiagram', ['definition', function(definition) { return camundaService.caseDiagram(definition.id); } ]); /* * Observers */ caseData.observe([ 'definition', function(definition) { $scope.selectedCase = definition; } ]); caseData.observe([ 'definitionDiagram', 'definition', function(definitionDiagram) { $scope.selectedCase.src = definitionDiagram; } ]); caseData.observe([ 'definitionsByKey', function(definitions) { $scope.caseVersions = definitions; } ]); /* * Bread Crumbs & Title */ caseData.observe([ 'definition', function(definition) { page.breadcrumbsClear(); page.breadcrumbsAdd({ type : 'caseDefinition', label : definition.name || definition.key || definition.id, href : '#/case-definition/' + definition.id, caseDefinition : definition }); page.titleSet([ 'camunda Cockpit', definition.name || definition.key || definition.id, 'Case Definition View' ].join(' | ')); } ]); } /* * Collect statistics */ $scope.instanceStatistics = caseData.observe([ 'instances.all', 'instances.current' ], function(all, current) { $scope.instanceStatistics.all = all.count; $scope.instanceStatistics.current = current.count; }); $scope.caseDefinitionVars = { read: [ 'definition', 'instances', 'caseData' ] }; $scope.caseDefinitionActions = Views.getProviders({ component : 'cockpit.caseDefinition.runtime.action'}); $scope.caseDefinitionTabs = Views.getProviders({ component : 'cockpit.caseDefinition.runtime.tab' }); function setDefaultTab(tabs) { var selectedTabId = search().detailsTab; if (!tabs || !tabs.length) { return; } if (selectedTabId) { var provider = Views.getProvider({ component : 'cockpit.caseInstance.runtime.tab', id : selectedTabId }); if (provider && tabs.indexOf(provider) != -1) { $scope.selectedTab = provider; return; } } search.updateSilently({ detailsTab : null }); $scope.selectedTab = tabs[0]; } /* * Tabs handling */ $scope.selectTab = function(tabProvider) { $scope.selectedTab = tabProvider; search.updateSilently({ detailsTab : tabProvider.id }); }; setDefaultTab($scope.caseDefinitionTabs); } ]; //use views module var module = angular.module('cockpit.plugin.acm-plugin.views'); // register routing for case definitions module.config([ '$routeProvider', function($routeProvider) { $routeProvider.when('/case-definition/:caseDefinitionId', { templateUrl : require.toUrl('../../../api/cockpit/plugin/acm-plugin/static/app/views/definition/definition.html'), // templateUrl : Uri.appUri('plugin://acm-plugin/static/app/views/definition/definition.html'), controller : DefinitionCtrl, authentication : 'required' }); } ]); return module; });
{ "redpajama_set_name": "RedPajamaGithub" }
8,993
Colonel William Butler (died 1789) was a Pennsylvania officer during the American Revolutionary War, known for his leadership in the Battle of Monmouth, the burning of the Indian villages at Unadilla and Oquaga, and in the Sullivan-Clinton Expedition. Butler's exact year of birth is unknown, but he was probably born in the mid-1740s. His family emigrated from Ireland sometime before 1760 and settled in Cumberland County, Pennsylvania. In the late 1760s he worked as a frontier fur trader near Pittsburgh with his brother Richard. He was commissioned a lieutenant colonel in the Continental Army upon the formation of the 4th Pennsylvania Regiment on October 25, 1776. He was retired from the Army on January 1, 1783. He was an original member of the Society of the Cincinnati. Family Butler was the second of five brothers who served as officers in the American Revolution. The two oldest brothers were born in Ireland. The brothers were, from oldest to youngest: Richard (1743–1791), killed in the Northwest Indian War William, the subject of this article Thomas (1748–1805), 2nd Pennsylvania Regiment, severely wounded in the Northwest Indian War Percival (1760–1821), 2nd Pennsylvania Regiment, an adjutant general of Kentucky in the War of 1812 Edward (1762–1803), 9th Pennsylvania Regiment and the Northwest Indian War, adjutant general of the US Army References Linn, John Blair. "The Butler Family of the Pennsylvania Line". Pennsylvania Magazine of History and Biography 7 (1883): 1–6. Purcell, L. Edward. Who Was Who in the American Revolution. New York: Facts on File, 1993. . American Revolution Institute 1789 deaths Continental Army officers from Pennsylvania American fur traders Kingdom of Ireland emigrants to the Thirteen Colonies Military personnel from Pittsburgh Year of birth unknown
{ "redpajama_set_name": "RedPajamaWikipedia" }
7,847
\section{Approach}\label{sec:approach} Our approach is based on collecting the vulnerability mitigation commits for JavaScript and Python projects from the dataset, which are potentially connected to a public CVE~\cite{cve} entry. To achieve this, we used a very simple but effective heuristics-based approach, similar to those widely used in works related to bug data collection~\cite{GVS19, 10.1145/1083142.1083147}. First, we searched for the commits containing the patterns ``CVE-'', ``CWE-'', ``NVD-'' (all of them are case insensitive) in their commit messages using SQL queries. Referring to a CVE or CWE identifier in the commit message is a widely used practice in case of vulnerability mitigation patches, so the community can understand why the given commit is extremely important and urgent to be merged. By filtering the \texttt{revision} table, we created a temporal table called \texttt{cve\_revs} with 357,757 rows (from the original 1.26 billion rows). After the first filtering step, we had to identify the programming language of the project a given commit belongs to. Since the structure of the database did not provide an effective way to do this, we used the information retrieved from the revisions' root directory: \begin{itemize} \item We considered a revision as a Python revision if its root directory contained either \texttt{\_\_init.py\_\_} or \texttt{setup.py}. Without at least one of these files, the project cannot be used as a Python module~\cite{packagingpython, pilgrim2009dive, younker2009foundations} (nor published on PyPI~\cite{pypi}), therefore it is a viable heuristics to detect Python projects. \item We considered a revision to be a JavaScript one if its root directory contained either \texttt{index.js}, \texttt{app.js}, \texttt{server.js} as one of these files will most likely be included in the root directory~\cite{nodejsdocumentation} of a JavaScript project. We did not consider \texttt{package.json} for identifying a revision as a JavaScript revision because \texttt{package.json} is often used in other languages as well, such as PHP (e.g. Symfony uses \texttt{package.json} to manage tools that are necessary for packing the application's frontend~\cite{symfonydocs}). \end{itemize} Based on this second round of filtering, we got 3,718 rows for Python and 4,136 rows for JavaScript, which we stored in two new tables: \texttt{cve\_revs\_py} and \texttt{cve\_revs\_js}, respectively. We analyzed the data collected in these instead of the original \texttt{revision} table. \subsection{Tools and Queries for Data Mining} We processed the collected Python and JavaScript revisions using Python scripts and pandas~\cite{mckinney2011pandas}, and used regular expressions\footnote{$(CVE-\backslash d\{4\}-\backslash d\{4,\})$, $(CWE-[\backslash d]\{1,4\})$, and $(NVD~.+)$} to find and extract the CVE/CWE IDs from the commit messages. All the used regular expressions and extraction scripts for finding CVE/CWE and vulnerability mitigating revisions are available in our online asset package.\footnote{\url{https://doi.org/10.5281/zenodo.3699486}} We also tried to filter commits for ``NVD'', but there were no matching commit messages. If a commit message contained more than one CVE or CWE references, we extracted all and considered them separately (i.e. the commit contained mitigation for more than one vulnerabilities). As a commit message can contain the same CVE/CWE IDs several times (for example, it can be in the first line of the commit message and later it can appear in the description as well), we had to remove the duplicates. Thus one CVE/CWE entry is considered only once per revision. Several rows has not been filtered out in the first step, but in the processing step we could not find any CVE/CWE IDs in their commit messages. We examined and validated all of these cases by hand. These revisions contained messages that could pass our first filtering but did not mention any valid CVE/CWE IDs, for example, \textit{execve-safe, Glennvd-patch-1, nvd-downloader, no CVE-id}. As we focused on the types of vulnerabilities, which can be described by the CWE identifier of the security problem category the vulnerability belongs to, we had to link each CVE entries to the corresponding CWE categories of the vulnerabilities. To achieve this, we relied on the data provided by the National Vulnerability Database~\cite{nvd} and used a customized version of CVE manager by Atlasis~\cite{cve-manager} to parse the JSON data files describing the CVE entries with meta-information, like its corresponding CWE category. Besides the CWE group of a CVE entry, we also extracted the publishing date, severity, and the base impact score of every CVE entries. Some revisions contained references to CWE groups without mentioning any specific CVE entries. These revisions were mapped directly to the referenced CWE categories. \vspace{-5pt} \subsection{Software Heritage Graph Dataset Version} We performed our study using the compressed PostgreSQL format~\cite{MSR19SH} of the full Software Heritage Graph Dataset~\cite{MSR20DC}. It took us several tries to correctly import the dataset into a local database. With some modifications to the original load script (e.g. removing concurrent index creation), we managed to import the whole database into a local server. The technical specifications of the database server we used were 20-core Intel CPU (2,6 GHz), 90 Gbs of RAM, 5 Tb SSD. Despite the quite strong hardware, the data import and queries were rather slow due to the enormous size of the database. To speed up the process, we created intermediate tables from the relevant information in a filtered and transformed way. \section{Conclusions}\label{sec:conclusions} Using the Software Heritage Graph Dataset, we analyzed the vulnerability mitigation commits in the Python and JavaScript projects from two aspects. On the one hand, we identified the types of vulnerabilities (in terms of CWE groups) referred to in commit messages and compared their numbers within the two communities. The percentage of vulnerability mitigation commits compared to the total number of commits in projects show a growing tendency (sharper in case of JavaScript, slower for Python). We detected 103 different CWE groups out of which 55 appeared in both languages projects. From the eight most prevalent vulnerability types, one was mitigated by both communities in equal numbers (CWE-200), but four (CWE-20, CWE-22, CWE-79, CWE-400) was typical to JavaScript, while three (CWE-399, CWE-264, CWE-119) to Python projects. This suggests that JavaScript and Python communities suffer the most from different types of vulnerabilities. On the other hand, we examined the average time elapsing between the publish date of a vulnerability and the date of the commit mitigating it. We found that in general, neither the JavaScript nor the Python community reacts very fast to appearing vulnerabilities (i.e. it takes more than 100 days on average to mitigate a vulnerability after its publish date). However, this reaction is 1.5-14 times faster in the Python community for the most common CWE categories (even to the ones more typical to JavaScript projects), while the JavaScript community seems to take special care only of three CWE categories: CWE-200, CWE-20, and CWE-400. \section{Introduction}\label{sec:introduction} Software security is one of the most striking problems of today's software systems. Large impact security vulnerabilities are explored on a daily basis, for example, a serious flaw~\cite{sudo-macos} has been discovered in 'Sudo', a powerful utility used in macOS this February. Security problems can cause not just financial damage~\cite{Anderson2013}, but can compromise vital infrastructure, or used to threaten entire countries. Our focus in this paper is to examine vulnerability mitigation (i.e. corrective code changes to resolve security vulnerabilities) within the open-source community and their typical types. We specifically target Python and JavaScript open-source projects as these languages are very popular and widely used in many domains today. By getting a detailed picture of what security vulnerabilities and when are mitigated in the open-source community of these languages, we can identify vulnerability categories that are not sufficiently addressed, explore patterns that might help to build more efficient vulnerability prediction models, or even discover some patterns that may help in generalizing the models. We investigate the following two research questions in this work: \emph{RQ1: What are the typical security vulnerability types the JavaScript and Python open-source communities mitigate and how do they relate to each other?} \emph{RQ2: How quickly the JavaScript and Python open-source communities mitigate a newly published security vulnerability?} Based on the rich set of data in the Software Heritage Graph Dataset~\cite{MSR20DC}, we found that the JavaScript projects refer to security vulnerabilities falling into 87 different categories, the Python projects to 71, out of which 55 security vulnerability categories are common. For vulnerability categorization, we use the widely adopted Common Weakness Enumeration (CWE) list~\cite{cwe}. Despite the large intersection in the security vulnerability types, the number of mitigated vulnerabilities differ significantly depending on the language of the projects. For example, Cross-site Scripting (CWE-79), Path Traversal (CWE-22), Improper Input Validation (CWE-20) and Uncontrolled Resource Consumption (CWE-400) type of vulnerabilities are mitigated mostly in JavaScript projects, while Resource Management Errors (CWE-399) and Permissions, Privileges, and Access Controls (CWE-264) are mitigated mostly in Python. The growing number of vulnerability mitigating commits is a common tendency in both languages, but it is proportionate to the growth of the total number of commits. The vulnerability mitigation per total commit ratio increases only slowly, however, there was a significant increase in the amount of vulnerability mitigation in the year 2018 for both JavaScript and Python projects (see Figure~\ref{fig:count_year_distr}). Regarding the number of days elapsing between the publish date of a particular security vulnerability and the date of the first commit with its mitigation is varying to a large extent. Typically, Python commits mitigate vulnerabilities no older than 100 days, while some JavaScript commits mitigate vulnerabilities older than a year. \section{Related Work}\label{sec:related} By exploring the life-cycle of the vulnerabilities~\cite{10.1145/1162666.1162671, 6227141}, one can understand their nature better, which helps to find or predicting them. Analogously to general bug prediction models, specific vulnerability prediction models have been introduced~\cite{10.1145/3196398.3196454, 10.1145/1853919.1853925}. A big question regarding them is how well they generalize across projects (or even across languages)~\cite{10.1145/2832987.2833051}. In their work, Li et Paxson~\cite{frankli2017} conducted a large-scale empirical study (with over 4000 security patches) to investigate the vulnerability fix development life cycle and its characteristics, compared to the non-security bug fixing life cycle and characteristics. They revealed that third of all security fixes are introduced more than 3 years after publishing. Xu et al.~\cite{xu2017spain} proposed a binary-level patch analysis framework called SPAIN, which identifies security (and non-security) patches by analyzing the binaries. The framework also detects patch and vulnerability patterns that can be used to detect similar patches/vulnerabilities in the given binaries. In contrast to this work, we analyzed the source code changes mitigating vulnerabilities. V{\'a}squez et al.~\cite{Vsquez2017AnES} analyzed 660 Android-related vulnerabilities and their fixes. They used both NVD and Google Android security bulletins to collect their data. Their analysis include vulnerability types and the hierarchical relationship between vulnerabilities, the impacted components and the survivability of the vulnerabilities. We instead analyzed JavaScript and Python vulnerabilities. \section{Results}\label{sec:results} After all filtering steps, we identified a total number of 3,458 vulnerability mitigation commits (i.e. commit messages containing valid CVE or CWE IDs) for JavaScript and 2,884 for Python to which we were able to resolve the corresponding CWE security type groups as well. Figure~\ref{fig:count_year_distr} shows the ratio of commits over the years in terms of the average number of vulnerability mitigation commits per 100k commits. \begin{figure}[htb!] \vspace{-8pt} \centering \includegraphics[width=0.7\columnwidth]{fig/js_py_issues_y_norm.png} \vspace{-10pt} \caption{Vulnerability mitigation ratio per year} \label{fig:count_year_distr} \vspace{-10pt} \end{figure} \begin{figure*} \centering \includegraphics[width=1.52\columnwidth]{fig/js_py_cwe_counts.png} \vspace{-10pt} \caption{Number of security issues found with the given CWE types} \label{fig:cwe_counts} \vspace{-15pt} \end{figure*} While Python vulnerability mitigation ratio is quite stable, the same ratio for JavaScript projects grows consistently from 2015, with a large peak in 2018, but is still lower than that of Python projects. As there are no JavaScript commits in Software Heritage Dataset before 2010, and the data for 2019 is still incomplete, we omitted those years from the analysis. Table~\ref{tab:stat} provides further details on the number of detected vulnerability mitigation commits and the total number of commits in the analyzed years. The distribution of the referenced CWE vulnerability types are depicted in Figure~\ref{fig:cwe_counts}. \begin{table}[htbp] \vspace{-12pt} \centering \footnotesize \caption{Commit statistics per year} \vspace{-10pt} \begin{tabular}{r|r|r|r|r} \hline \multicolumn{1}{l|}{Year} & \multicolumn{1}{c|}{Vuln. JS} & \multicolumn{1}{c|}{Vuln. PY} & \multicolumn{1}{c|}{Total JS} & \multicolumn{1}{c}{Total PY} \\ \hline \hline 2010 & 0 & 225 & 102,525 & 1,597,160 \\ 2011 & 0 & 67 & 675,492 & 2,068,155 \\ 2012 & 6 & 343 & 2,078,887 & 2,663,836 \\ 2013 & 41 & 209 & 5,705,696 & 3,436,804 \\ 2014 & 84 & 291 & 12,692,836 & 4,440,660 \\ 2015 & 111 & 328 & 23,794,463 & 5,537,294 \\ 2016 & 239 & 453 & 38,990,699 & 6,527,350 \\ 2017 & 393 & 329 & 40,883,417 & 6,835,803 \\ 2018 & 2584 & 639 & 37,729,971 & 6,315,866 \\ \hline \end{tabular}% \label{tab:stat}% \vspace{-19pt} \end{table}% \subsection{Typical Security Issue Types (RQ1)} To answer RQ1, we examined the extracted vulnerability mitigation commits with 103 different CWE categories. From these 103, 55 CWE types occurred in both JavaScript and Python commit messages, while 32 CWE groups were found only in JavaScript projects, while 16 only in Python projects (however, the number of vulnerabilities with such types were very low). We examined the most popular CWE categories in more detail. The CWEs having at least 150 references in either of the analyzed languages are as follows: \begin{itemize} \item \emph{CWE-79} -- Improper Neutralization of Input During Web Page Generation (Cross-site Scripting). \item \emph{CWE-399} -- Resource Management Errors. \item \emph{CWE-200} -- Information Exposure. \item \emph{CWE-20} -- Improper Input Validation. \item \emph{CWE-264} -- Permissions, Privileges, and Access Controls. \item \emph{CWE-400} -- Uncontrolled Resource Consumption. \item \emph{CWE-119} -- Improper Restriction of Operations within the Bounds of a Memory Buffer. \item \emph{CWE-22} -- Improper Limitation of a Path-name to a Restricted Directory (Path Traversal). \end{itemize} Interestingly, except for CWE-200 that is the type of the vulnerabilities mitigated in more than 200 commits in both languages, each of the other six CWE groups can be attributed to either JavaScript or Python projects (i.e. one of the languages contain the majority of the mitigation to these vulnerability types). On the one hand, Cross-site Scripting (CWE-79), Path Traversal (CWE-22), Improper Input Validation (CWE-20) and Uncontrolled Resource Consumption (CWE-400) type of vulnerabilities are mitigated mostly in JavaScript projects. All these vulnerability types are primarily relevant for web applications, where JavaScript is heavily used at the client-side, thus it is more probable that a JavaScript project encounters such vulnerabilities. On the other hand, mitigation of Resource Management Errors (CWE-399), Permissions, Privileges, and Access Controls (CWE-264), and Improper Restriction of Operations within the Bounds of a Memory Buffer (CWE-119) type of vulnerabilities occur in Python commits mostly. These are more relevant at the server-side, where Python seems to dominate. There is a significant overlap in these categories as well, so projects from both languages have vulnerabilities with all these CWE types, but based on the data we have, it seems that these are more typical for a particular language. \vspace{-8pt} \subsection{Reaction Times to Security Issues (RQ2)} To answer RQ2, we analyzed the average number of days elapsing between a mitigation commit date and the publish date of a CVE entry mentioned in that commit. Figure~\ref{fig:avg_fix_days_y} depicts a general overview of these average number of days per year. We can see that it takes about 100 days on average for both communities to start mitigating a public vulnerability in their code-base, with some peaks in years 2010 and 2014 for Python and 2017 for JavaScript. Therefore, we can conclude that at a very general level, neither the JavaScript nor the Python communities react fast to appearing vulnerabilities in their code. It would be also interesting to see, if there are reported CVE entries that are never mitigated in reality, but it would require an entirely different methodology and could be a good future research. \begin{figure}[htb!] \centering \vspace{-7pt} \includegraphics[width=0.8\columnwidth]{fig/js_py_avg_fix_days_y.png} \vspace{-10pt} \caption{Average number of days between mitigation commit date and CVE publish date grouped by years} \vspace{-5pt} \label{fig:avg_fix_days_y} \end{figure} We also examined the eight most prevalent CWE categories from the same aspect. The average number of days elapsed between the publish date of a CVE entry and the date of its mitigation commit for the top eight CWEs are shown in Figure~\ref{fig:fix_days_top_cwe}. The Python community reacts 1.5-14 times faster to these type of vulnerabilities than the JavaScript community; most of the mitigation commits appear 50 days or less after the publish date of the corresponding vulnerabilities. In the case of JavaScript, only vulnerabilities from three CWE categories enjoy extra care (CWE-20, CWE-200, CWE-400), all the others are mitigated after at least 100 days. \begin{figure}[htb!] \vspace{-7pt} \centering \includegraphics[width=0.7\columnwidth]{fig/js_py_avg_fix_days_top_cwe.png} \vspace{-10pt} \caption{Average number of days between commit date and issue publish date for the most common CWEs} \label{fig:fix_days_top_cwe} \vspace{-8pt} \end{figure} The JavaScript community reacts exceptionally fast to information exposure (CWE-200) type of vulnerabilities (after only 32.5 days on average), while improper input validation (CWE-20) and uncontrolled resource consumption (CWE-400) are mitigated after about 50 days on average. Interestingly, the vulnerabilities falling into the CWE categories characteristic to Python (CWE-264, CWE-399, and CWE-119) are mitigated after 200 days or more. \section{Threats to Validity}\label{sec:threats} We had to apply heuristics to determine the language of the projects (as the exact solution would have been practically infeasible due to the database structure). Due to this, we might have omitted some projects as well as identified some projects wrongly. However, as our heuristics are based on widely established guidelines and best practices that most of the projects follow, the number of these projects should be minimal. In most of the cases the committers mention CVE IDs explicitly, however, there are unusual references, for example ``Fixed XSS (with CVE number 2020-100)'' or ``CVE-2020-20500/330/34/345''. Also, there is a chance that a committer mentions a CVE in a context that is not related to fixing its underlying security issue. In such cases, we might drop valid vulnerability mitigation commits or include invalid ones. To estimate the impact of this threat, we manually evaluated 700 randomly selected commit messages from the identified revisions. In the vast majority of the evaluated cases, the commit messages refer to CVE IDs as we anticipated, thus the impact of this threat should be minimal.
{ "redpajama_set_name": "RedPajamaArXiv" }
5,438
In conversation with Nilima Sheikh - Part I Between Documenta at Athens and Kassel, Nilima Sheikh speaks to Gayatri Sinha on the making of a language that imbeds violence in pervasive beauty. by Gayatri Sinha Gayatri Sinha is an art editor, critic and curator. Her primary areas of enquiry are in gender and iconography, media and the study of classical texts. She is the founder of criticalcollective.in, India's first web based archive and news magazine on art. As curator she has worked with photography and video art from archival and contemporary sources. Her curatorial projects include: Moving Still Performative Photography in India at the Vancouver Art Gallery, the Ethnographic Museum, Heidelberg, 2019; Envisioning Asia: Gandhi and Mao in the Photographs of Walter Bosshard, Navjivan Trust, Ahmedabad 2019, KNMA, New Delhi 2018; Part Narratives, Bikaner House, New Delhi, Dr. Bhau Daji Lad Museum, Mumbai 2017; Diary Entries, Gallery Espace, 2015; Video Art Programme, Dr. Bhau Daji Lad Museum, Mumbai, 2013-2015; Water in the Musee d'Anselmbourg and the Grand Curtius Museum, Liege, 2013, Ideas of the Sublime, Lalit Kala Akademi, 2013; Cynical Love: Life in the everyday, Kiran Nadar Museum, 2011; Looking Glass: The Existence of Difference (Religare Arts Initiative, Max Mueller Bhavan, British Council), 2010; Constructed Realities, Shanghai, 2010; Failed Plot, KIAF, Seoul, 2009; Public Places, Private Spaces: Contemporary Photography and Video Art in India, The Newark Museum, New Jersey, 2007 and Minneapolis Institute of Arts, 2008; Watching Me Watching India Contemporary photography in India, Fotografie Forum, Frankfurt, 2006; Middle Age Spread: Imaging India 1947 - 2004, National Museum, New Delhi, 2004; Vilas: The Idea of Pleasure, Birla Academy, Mumbai, 2000; Woman/Goddess 1998-2001 (Delhi, Bangalore, Chennai, Kolkata, New York); The Self and the World, Women artists at the National Gallery of Modern Art, 1997. She has edited Voices of Change: 20 Indian Artists (Marg, 2010), Art and Visual Culture in India 1857- 2007 (Marg Publications, 2009); Indian Art: an Overview (Rupa Books, 2003), Expressions and Evocations Contemporary Women Artists of India (Marg, 1996) and written monographs on Krishen Khanna, Himmat Shah and M F Husain. She has lectured widely including at the Tate Modern, MoMA New York, the Rockbund Museum Shanghai, Arken Museum Denmark, CUNY, Duke University, USA. She has received research grants from the Ministry of Culture, Government of India and Ford Foundation. She was the recipient of the Tate Asia Research fellowship 2017. Gayatri Sinha: When you show your scrolls Nilimaji do you intend there to be an order in how they are viewed? Nilima Sheikh: I hadn't planned an order but eventually after the install of Each night put Kashmir in your dreams I did first in Bombay, then at Lalit Kala Akademi in Delhi, and then later, a bigger version in Chicago - what happened is that a general kind of order seemed to emerge. It was not designed but most of the time I displayed them in a similar sort of way. What we have shown in Athens is from Each night put Kashmir in your dreams, older works, already seen in India. At Kassel there is a new set of 16 works , four of them are primarily of text, Terrain: Carrying Across, Leaving Behind. GS: Can you describe some of the new work? NS: This is actually one of the last ones I did; it refers to Rohith Vemula and draws from his letter. There is one part of it quoted here. He uses the phrase Shadows to Stars and I've kind of kept that as the forming impulse. There are hanging figures which are not specifically quoted from photographic sources but do refer to newspaper coverage a year or so ago when the bodies of Dalit men were found hanging from a tree. This is a Sohni Mahiwal that I have painted earlier, and then done again, trying to pick up threads. You know how in Greater Punjab there are songs identified most often by the female protagonist - Sohni, Heer, or Sassi, sung in praise of love that defies community and patriarchal censure, in a land stained by the bloodshed of inter-community and honour killing. GS: What do you think it is? A great contradiction? NS: It is a great contradiction; I would like to work more on this to understand it better. I really don't know what this is. But even now a Heer is sung with so much passion both in Pakistan and India. And all of these songs are about inter-community love and the defiance of patriarchy. GS: But the consequence is always death. That it is doomed and it cannot sustain the passion. Is making the work distressing? NS: Somebody asked me recently if I get depressed while working. Obviously it does distress me when I'm reading about it or thinking about it but I don't think depressed is the right word. GS: What is the feeling when one works like that? Is it just the excitement of the formal resolution, the thinking around the work? NS: It is not just the formal resolution. There is excitement of bringing them together. GS: The idea and image? NS: The emotion, content and formal energy. One has to be so careful not to trivialise the content. I remember many years ago when I painted the Champa series, it used to worry me a lot that the life of this young girl who lost her fragile life could be trivialized. The idea of doing it in a sort of folio form came out of that, that it should be seen, not just up there on the wall for everybody; something that can be put away quietly. Somehow that feeling was there - the match of the language and the emotions with which one is facing it. And this time particularly this is my concern, for each scroll I needed to hone the language. GS: For each scroll as in a subject? NS: For each painting. It might not seem so from the outside. When one tries to work from within there have to be those slight changes, which would bring some kind of suitable feeling. GS: You said you liked the folio because you could put it away? NS: At that time…yes. GS: Does that apply to the scroll because it can be rolled away and in that way it maintains its cocoon of privacy or quietude? NS: Yes. It comes from a long term understanding, from Coomaraswamy, elsewhere, within Asian art, which made one understand the difference between an easel painting, presences which could stay with you, and other kinds of viewing that may be transient. It is not necessary that I wouldn't want the scroll to be up for a long time. But the way it can be viewed is within the nature of the form, the structuring principles. GS: Much of the work, seem to step out of a static mould into a dynamic engagement with time. I'm very struck by just these images of your work at Athens. The scroll itself is one that can come down and go up but within the scroll there are different divisions, the horizontal and the vertical colour divisions, which seem to suggest a sort of a planar movement of time. NS: Absolutely. I would say that the relationships of image and narration is within the interplay of planes, I think I enjoy very much giving each of them an autonomous space and this is often by shifting the scale and making their world within that larger world. GS: So it is an act of conferring a certain dignity and privacy? The dignity I think more than anything else because otherwise in a large scroll the figure would be so exposed. And when you do expose the figure, as with Sohni in the waters, then the sheer magnitude of this figure within this vastness seems to suggest another kind of play, that there is an abandonment or an absence of protection. It's as if the water body is going to expand and the banks on the two sides might disappear. How do you deal with this spatially because you don't have so many antecedents for the scroll? Or do you look at the Phad or Cheriyal scrolls? NS: In many ways. With the scroll or Phad, as with the miniature, what works for me is the additive mode. This is an argument I have been having with myself and within a circle of friends - I remember the first time I suggested it, additive was such a bad word. It was a negative word, considered extraneous. I think I do love the absence of finality of an artwork. I want to keep the option of having another version, of working with the notion of a palimpsest, or of extension. And that you can add to it in the way a miniature painting would, through seriality, through the contra positioning hashiyas, or a Pichhvai would with its innumerable panels. There are diverse ways in which they tell their stories. And also thangkas… GS: What of Indian maps? The wonderful construction of the maps of the vertical flattening of the cosmology, and in that sense the treatment of time would be very similar to what happens here. NS: This is true of mural traditions in many countries. We have all kinds of devices of extending spaces. GS: When one looks at the work, the question often comes up about the relationship of kinds of spaces. Especially in the work that went to Athens there are at least two types of scale - there is perhaps the landscape and there is within the landscape if not a narrative, the suggestion of a figure and it's placing and its affective or psychological state. Then there is also within the same work the chhaap or print, of the stencil and the text. This resolution of where borders are drawn, where you want to put the text within the image, how does it work for you? NS: I thinkitcomesagain from understanding that for instance, there is no 'one' history; there are histories. There is never one entry point but many entry points. And contexts change orientations. Something that you keep repeating, changes with every remaking, every context. In painting there are many ways of giving context. The way you are painting it gives it a context, or the colours you use, or the size, the relationship of scale,…shifting contexts is somehow an ever renewing thing. GS: One of the attitudes in the work or the dominant impression one often gets is of great beauty and of course loss, a sort of a poetics of loss. Loss can easily slip into disintegration so it's very much on the edge of that, but this attitude of mourning or loss seems to pervade such a large body of the work and the narratives that flows between these and then intermingle with our lives… NS: But the mourning is not entirely without celebration? GS: I think there is a celebration of energy. NS: I am thinking about this for the first time so it's not something I have thought through… GS: I think there is celebration in the painterly-ness of the work. The colours, the flow, the movement, because there is great dynamism in the work itself. In the way that you prevent stasis. You don't let it rest. The work has a silent movement, a churning, flow even chaos, the elements of air and water in complement are very strong in the work and they are whipping up their own energies. I think there is celebration and there may be great beauty I think in your appreciation of the seasons. I think your position as a painter in the excavation of mythographies, of narratives long forgotten, let's say even the privileging of the narratives in Punjab. Over the last few decades who talked about Punjab? All the honouring of the folk tradition, of the textiles of India has been of the west coast. It's not been of the areas of Punjab and Kashmir where there has been so much disturbance but where the crafts were not honoured on a national level as you had in Gujarat or Central India or South India. That's often worried me that if only these craft traditions in the 50 or 60 year period had been honoured and given the same space and understanding, we might have had a different history. I wonder how it is that successive people who make these kinds of decisions completely occluded Punjab and Kashmir. Those are the territories you return to interestingly and you excavate the poetry, the myths…Punjab has not been fashionable. It's only recent that there have been relationships drawn in the literary mould between the great histories of migration and Partition in Punjab. NS: This is something that I might have shared with you earlier. Kashmir has been in my zehn for quite a long time, even as a very young artist, starting off after college, it was always there within my body. The land, which hosted my visual understanding of space, was Kashmir in a sense. GS: Was this prompted by family holidays? NS: This might sound very trivial but family holidays for us were quite adventurous. We used to often travel with tents, mule packs and Gujjar guides. It was the time when trekking in the mountains was very different ….(laughs). We used to arrange these tents, and the Gujjars would come along with us as we used to move from one place to another. Having this childhood experience of seeing this world and walking this world… walking a world is very different from seeing it in any other way. You see everything, flowers under foot and the next range of mountains - all in one sweep. Going from one valley, crossing a pass and turning to another valley. GS: How old were you? NS: Basically all through my adolescence. Early adolescence to my young twenties. Every summer, we would set off, sometimes in Himachal, and some times in Kashmir. I was asthmatic; it was a little more of a struggle for me than for my sister who was far more athletic. But my parents were doctors. My father used to carry with him one mule pack of cartons of medicines. So every place we went the news would spread that a doctor has come, and there would be a medical camp, morning and evening. He used to examine patients and dispense medicines. Those were places where there was no medical care at all. I remember Gujjars settled up there for the summer with their cattle in the high pasture-lands would bring milk for us…. What I was trying to tell you is that in the artist world which was my context when I started painting, the complexities of the land of Kashmir were not admitted- it was not part of their "real' life. I think a lot of the problem for our generation of intellectuals lay in seeing it as an exotic place, something out of the purview of the real India. For a long time I had to deal with this dilemma, that this is what I want to paint. My whole understanding of spatiality was something that came from there. But there was a taboo that I had to cross. Like you said, these were areas that were not celebrated. For the artist, film maker community Rajasthan might have been the 'real' north India. GS: Something like Phulkari for all its beauty and its modernity never got a look in. NS: I am from a Punjabi family, have family in Punjab and we would visit regularly but I think my association with Madan Gopal Singh and Manjit Bawa was instrumental in deepening my view and appreciation of the music of the region. However, my first exposure to the Quissas of Punjab was through seeing Sheila Bhatia's now iconic production of Heer in my childhood. GS: Ranbir said that in 1984 he, Madan and Manjit would meet in a little studio shared with Leela Mukherjee and they overcame that difficult period by singing the songs of Punjab. But in your isolation, in your appreciation of Kashmir, was it a challenge to think of using a language? NS: Yes in the early 70s, I had started doing oil paintings that had flora, river and mountain-scapes from Kashmir and Himachal. After I had my children my whole understanding of intimacy and the intimate object changed quite considerably and I think that catalysing of a wider space through this intimacy became very crucial. To learn, I had started looking at Indian and Persian miniature painting a lot, but also of many of the other Asian traditions including the Chinese … GS: And the grandeur of scale. NS: So I think those were entry points to enable me to start to think of Kashmir. This would be my unlearning the studio language I'd learned and trying to learn language through the pictorial histories I had learnt to love. And Gulam (Sheikh) was my partner in this. He had for many years taught many of these art histories, and I learnt to share this great passion. So we would travel a lot to museums and sites within India and abroad to see works of art. He has great passion for Italian painting and I married into that. (Laughs) However, as a woman with growing children my lifewasdifferentfrom Gulam's or Bhupen's, no matter how much we shared. I had to find my voice on my own. GS: You were living in your home Niharika with Gulam and your children? NS: Not Niharika, we used to live in this amazing place - the British Residency. It was used for University teaching staff accommodation. We lived in a small part of it. It had this huge somewhat unkempt garden where the kids would have a great time. There was quite a community of children because the university class IV servant quarters were close by so the kids from there used to come and play as well. It was good for my children that they had a chance to grow up without too sharply defined class barriers. During that time I used to paint the children who used to come to play - into my paintings GS: How do you see Dalhousie, Himachal as compared to Kashmir? NS: Dalhousie was home. Since there was a home to return to there was comfort and familiarity in the landscape. I think Dalhousie has given me a lot though, hill town life, locales - or if you look at the light in these forested areas, the way that it sparkles is different from in the planes…I found it difficult to complete a painting in the planes that I had started in the hills. GS: To come to the forming of your figures, when you are speaking of 1984, Left movements, Left intellectuals domination at that time, you would have had Baroda and its relationship with England and you would have had the Kerala Radicals. NS: That came later; I am talking about the earlier period, when my political awareness was growing partly through my association with Vivan Sundaram, Sudhir Patwardhan, others. It was not that I did not learn from or share these concerns. It was what appeared to me as closures, that came with the left modernist position that excluded many of my concerns. GS: And these positions were very dominant positions? NS: They were dominant…it was the combination of modernism and Left orientations that was making too many closures for me. GS: So you decided to perhaps withdraw from both? NS: No, it was not so well thought out at that time. It's only in retrospect that I could put this in perspective. But like I said my life as an artist and as a woman with my children growing up had another orientation, which I couldn't share with many people around me. Till friendships with Arpita, Madhvi and Nalini deepened and we started to show and share together through the mid-eighties. It is later, in the late 80s - that I was part of this workshop that Vivadi, a feminist collective that had been set up by Anuradha Kapur with Vidya Rao, Kumkum Sangari, Shheba Chhachi, Urvashi Butalia, others which gave me another sense of sharing. A sharing that was different from that with the generation just before theirs. I felt that my work had seemed to become more immediately accessible. GS: How long did you continue to paint and feel resistance? NS: It was not so clear that there was this resistance there but one has to work with one's own guilt and vulnerabilities. It is not that I did not have support amongst friends. There was always Gulam. And Bhupen for instance, was supportive. GS: How did he read the work? What was his understanding of it? He would have understood there is strong gender interest. NS: In a teasing way he would say that my feminism was easier to deal with than Nalini's. (laughs) But I think he liked my drawing. At art school we are quite adept at doing life studies etc. But I realised that there was a mismatch: the kind of figure that I was wanting to place into the kind of spaces that I was trying to make, wasn't working. So I had to develop new ways of making figures. GS: You arrived at this figure in a stunning way, so I was thinking what were the antecedents and perhaps can we draw a line from Amrita Sher-Gil through Satish Gujral's figures of mourning. NS: Sher-Gil, yes. But I didn't respond to Gujral at that time. GS: Pran Nath Mago's drawing? NS: Perhaps, but they were not a part of my greater understanding of things. Sher-Gil I did appreciate, even though Sher-Gil was thrust down our throat all the time as art students. But nonetheless I do admire the volume of work... and the way she has developed this north Indian female figural type and its body language. GS: The language of the body, how she holds herself. It has allowed you to slide back and forward in time. There is an adaptation in the way you use the figure for instance in the Panghat Stories or Champa. The continuum across forty or fifty years, sliding back into Sohni and forward into Kashmir. NS: I think you're quite right that Sher-Gil would have provided a base for that. GS: I wonder where it came from…and this is beyond the miniature. NS: Nainsukh, the Kangra shailis, the rhythms of for instance the Nala-Damayanti series, were always there to aspire towards. There was a painting in the Bhagavat Purana that I used to yearn to be able to paint like, just an ordinary scene of a procession, and I still feel I want to learn to draw from that. It's important to re-learn to draw with each set of works. GS: There is an acute vulnerability in the figure. If we look at the miniature classifications for instance, she's not for instance Basohli. NS: No. GS: Not strong and powerful. She doesn't have the seduction of Kangra. The coy, shy beauty of Chamba. So I was wondering that within the miniature traditions was there a figural type that particularly attracted you or a style or a painter? You mentioned Nainsukh. NS: The whole shaili of Pandit Seu, especially the great Nainsukh perhaps. Though, I very much admire Basohli, and several other schools of Pahari painting but I think the kind of naturalism of the Pandit Seu's school made it seem more accessible to me. GS: These are also very tender figures. The figure of humility is also very particular to your work and which would have been quite contrary to the political attitude making, where the artist's position or the artist's articulation, that kind of naming and claiming became very important. In your work there is always a mediation through another story. NS: I think I look for that…this mediation. I think my interest in Agha Shahid Ali is also from there, this sharing, or should I say, cumulus of language. GS: So, this would have been outside the modernist paradigm, of modernism and left politics? NS: I'm talking about the modernist finality of the framed work, and the sort of the masterfulness of the work. An artist like Tyeb, say for instance. For all the humanism the work contains, it is a masterfulness that makes the image and it is final, you don't shift anything, change anything around. I'm not talking only of Tyeb, I'm talking about the form, that it had lost the ability to negotiate with the viewer, allow him or her to enter, re-enter, go within and without, rediscover the image inmanyways. I missedthe possibility of interleaf within it. I'm using a wrong word perhaps and I don't mean it in a critical way, but there was a sort of out there pomposity in the form. This is it…this is how a great work of art is. Not that I didn't admire it but I didn't feel drawn to it. I didn't feel that it was the way I could articulate myself. GS: It is also not inclusive in a way that the Italian mural is… NS: That is very correct. GS: It does not allow you space for accommodating yourself. NS: Yes, the viewer's space. GS: That the viewer can gain a toe hold among the many. There's none of that possible. NS: Exactly, there is none of that possible. GS: That's an interesting thing you are saying what does then art purport to do? Does it hold up a mirror to the world or does it assume the authority of a monument in some respect. It's just there and you can stand back and stare at it. NS: All work is about the human condition. quissa - tale, fable, romance, quarrel, dispute zehn - memory, mind, understanding hashiya - margin shaili - style or practice pichhvai - an Indian temple hanging with scenes from the life of the Hindu deity Krishna, used behind the temple idol. phulkari - an embroidery technique from the Punjab region literally means flower work. Simple and sparsely embroidered odini (head scarfs), dupatta and shawls, made for everyday use, are called Phulkaris, whereas garments that cover the entire body made for ceremonial occasions like weddings and birth of a son, fully covered fabric is called Bagh (garden). phad - a stylised form of scroll painting practiced in Rajasthan. cheriyal scroll - a narrative form of scroll painting rich in the local motifs peculiar to the Telangana region. tangkha - a Tibetan painting on cotton or silk applique, usually depicting a Buddhist deity, scene, or mandala. Sohni Mahiwal - one of the four popular tragic romances of Punjab. Sassi Punnu - a famous folktale of love narrated in the Sindh region. Heer Ranjha - a popular tragic romance of the Punjab. Vivadi - a working group of painters, musicians, writers and theatre practitioners, formed in Delhi in 1989. A conversation Between Vishakha N. Desai and Nilima Sheikh and Shahzia Sikander to mark the exhibition, Conversations with Traditions at Asia Society, New York, 17 November 2001 by Vishakha N. Desai Nilima Sheikh: Human Encounters with the Natural World by Mala Marwah Nilima Sheikh- The Picture and Beyond by Mala Marwah Exhibition Review: Nilima Sheikh's paintings by Mala Marwah
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
3,299
Q: Only able to login ONCE with Selenium and Django Testing I'm testing using Django's tests and Selenium so I can run tests with a live browser. But it won't let me log in more then once. I am using Django's StaticLiveServerTestCase to access both static and media files live. I login by going to the page. I've tried putting the login code both in setUpClass to run once at the beginning and setUp to run each time. Both only let me log in once. Here's the code: from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.contrib.auth.models import User from selenium import webdriver @override_settings(DEBUG=True) class LoginTest(StaticLiveServerTestCase): @classmethod def setUpClass(cls): super().setUpClass() # create user cls.user = User.objects.create_user( 'Testing User', 'somewhere@wherever.com', 'pwd') # initalize webdriver cls.driver = webdriver.Chrome() # doesn't work on FireFox either cls.driver.set_window_size(1280,800) cls.driver.implicitly_wait(5) # login - send username and password to login page cls.driver.get(cls.live_server_url+'/accounts/login/') cls.driver.implicitly_wait(10) username = cls.driver.find_element_by_name('login') username.clear() username.send_keys(cls.user.username) password = cls.driver.find_element_by_name('password') password.clear() password.send_keys("pwd") password.submit() # eubmits form @classmethod def tearDownClass(cls): cls.driver.quit() # quit after tests have run super().tearDownClass() def test_login_one(self): # this test PASSES self.driver.get(self.live_server_url) # go to home page login_menu = self.driver.find_element_by_id('login_menu') self.assertTrue( # if logged in username is in text of #login_menu self.user.username in login_menu.text ) def test_login_two(self): # this test FAILS self.driver.get(self.live_server_url) # go to home page login_menu = self.driver.find_element_by_id('login_menu') self.assertTrue( # if logged in username is in text of #login_menu self.user.username in login_menu.text ) This code logs in once at the beginning. But I've also tried code that logs in each time a test is run (using setUp instead of 'setUpClass') and it still only lets me log in once. Any idea what's going on? Update: I tried logging in a second time on test_log_in_two (the 2nd test) and I saw a "username and password not found" error in the chrome window. A: What you are trying to achieve here is the capability of log in twice which is possible you just have to make a simple check inside your test method for presence of element after login happened, an if found you can simply logout and let the remaining code do it's work. Let me show you with a template what I am trying to say here : @override_settings(DEBUG=True) class LoginTest(StaticLiveServerTestCase): @classmethod def setUpClass(cls): super().setUpClass() logInFunction() @classmethod def tearDownClass(cls): cls.driver.quit() # quit after tests have run super().tearDownClass() def test_login_one(self): # this test PASSES if checkForAlreadyLoggedInElement() : call logoutFunction() logInFunction() self.assertTrue(checkForAlreadyLoggedInElement()) def test_login_two(self): if checkForAlreadyLoggedInElement() : call logoutFunction() logInFunction() logoutFunction() logInFunction() self.assertTrue(checkForAlreadyLoggedInElement()) Hope the template clears the picture on how you should proceed. Let me know if you have any other doubts.
{ "redpajama_set_name": "RedPajamaStackExchange" }
333
\section*{Appendix A: Perfect Recovery Guarantee for the Problem (\ref{eqn:pro})} The following theorem shows the perfect recovery guarantee for the problem (\ref{eqn:pro}). Appendix C provides the proof for completeness. \begin{theorem}\label{thm:perfect-recovery} Let $\textbf{X}^* \in \mathbb{R}^{n\times n}$ be a rank $k$ matrix with a singular value decomposition $\textbf{X}^* = \textbf{U}\Sigma \textbf{V}^{\top}$, where $\textbf{U} = (\mathbf{u}_1, \ldots, \mathbf{u}_k) \in \mathbb{R}^{n\times k}$ and $\textbf{V} = (\mathbf{v}_1, \ldots, \mathbf{v}_k) \in \mathbb{R}^{n\times k}$ are the left and right singular vectors of $\textbf{X}^*$, respectively. Similar to many related works of matrix completion, we assume that the following two assumptions are satisfied: \begin{enumerate} \item The row and column spaces of $\textbf{X}$ have coherence bounded above by a positive number $\mu_0$. \item Max absolute value in matrix\ $\textbf{U}\textbf{V}^{\top}$ is bounded above by $\mu_1\sqrt{r}/n$ for a positive number $\mu_1$. \end{enumerate} Suppose that $m_1$ entries of $\textbf{X}^*$ are observed with their locations sampled uniformly at random, and among the $m_1$ observed entries, $m_2$ randomly sampled entries are corrupted. Using the resulting partially observed matrix as the input to the problem (\ref{eqn:pro}), then with a probability at least $1 - n^{-3}$, the underlying matrix $\textbf{X}^*$ can be perfectly recovered, given \begin{enumerate} \item $\mu(\textbf{E})\xi(\textbf{X}) \leq \frac{1}{4k + 5}$, \item $\frac{\xi(\textbf{X}) - (2k -1)\mu(\textbf{E})\xi^2(\textbf{X})}{1 - 2(k+1)\mu(\textbf{E})\xi(\textbf{X})} < \lambda < \frac{1 - (4k+5)\mu(\textbf{E})\xi(\textbf{X})}{(k+2)\mu(\textbf{E})}$, \item $\ m_1 - m_2 \geq C[\max(\mu_0, \mu_1)]^4n\log^2 n$, \end{enumerate} where $C$ is a positive constant; $\xi(\circ)$ and $\mu(\circ)$ denotes the low-rank and sparsity incoherence~\citep{chandrasekaran2011rank}. \end{theorem} Theorem~\ref{thm:perfect-recovery} implies that even if some of the observed entries computed by (\ref{eqn:A}) are incorrect, problem (\ref{eqn:pro}) can still perfectly recover the underlying similarity matrix $\textbf{X}^*$ if the number of observed correct entries is at least $O(n \log^2 n)$. For MATL with large $n$, this implies that only a tiny fraction of all task pairs is needed to reliably infer similarities over all task pairs. Moreover, the completed similarity matrix $\textbf{X}$ is symmetric, due to symmetry of the input matrix $\textbf{Y}$. This enables analysis by similarity-based clustering algorithms, such as spectral clustering. \section*{Appendix B: Proof of Low-rankness of Matrix $\textbf{X}$} We first prove that the full similarity matrix $\textbf{X} \in \mathbb{R}^{n\times n}$ is of low-rank. To see this, let $\textbf{A} = (\mathbf{a}_1, \ldots, \mathbf{a}_k)$ be the underlying perfect clustering result, where $k$ is the number of clusters and $\mathbf{a}_i \in \{0, 1\}^n$ is the membership vector for the $i$-th cluster. Given $\textbf{A}$, the similarity matrix $\textbf{X}$ is computed as \[ \textbf{X} = \sum_{i=1}^k \mathbf{a}_i \mathbf{a}_i^{\top} = \sum_{i=1}^k \textbf{B}_i \] where $\textbf{B}_i = \mathbf{a}_i \mathbf{a}_i^{\top}$ is a rank one matrix. Using the fact that $\mbox{rank}(\textbf{X}) \leq \sum_{i=1}^k \mbox{rank}(\textbf{B}_i)$ and $\mbox{rank}(\textbf{B}_i) =1$, we have $\mbox{rank}(\textbf{X}) \leq k$, i.e., the rank of the similarity matrix $\textbf{X}$ is upper bounded by the number of clusters. Since the number of clusters is usually small, the similarity matrix $\textbf{X}$ should be of low rank. \section*{Appendix C: Proof of Theorem \ref{thm:perfect-recovery}} We then prove our main theorem. First, we define several notations that are used throughout the proof. Let $\textbf{X} = \textbf{U}\Sigma \textbf{V}^{\top}$ be the singular value decomposition of matrix $\textbf{X}$, where $\textbf{U} = (\mathbf{u}_1, \ldots, \mathbf{u}_k) \in \mathbb{R}^{n\times k}$ and $\textbf{V} = (\mathbf{v}_1, \ldots, \mathbf{v}_k) \in \mathbb{R}^{n\times k}$ are the left and right singular vectors of matrix $\textbf{X}$, respectively. Similar to many related works of matrix completion, we assume that the following two assumptions are satisfied: \begin{enumerate} \item {\bf A1}: the row and column spaces of $\textbf{X}$ have coherence bounded above by a positive number $\mu_0$, i.e., $\sqrt{n/r} \max_{i}\|\textbf{P}_{\textbf{U}}(\mathbf{e}_i)\| \leq \mu_0$ and $\sqrt{n/r} \max_{i}\|\textbf{P}_{\textbf{V}}(\mathbf{e}_i)\| \leq \mu_0$, where $\textbf{P}_{\textbf{U}} = \textbf{U}\U^{\top}$, $\textbf{P}_{\textbf{V}} = \textbf{V}\V^{\top}$, and $\mathbf{e}_i$ is the standard basis vector, and \item {\bf A2}: the matrix $\textbf{U}\textbf{V}^{\top}$ has a maximum entry bounded by $\mu_1\sqrt{r}/n$ in absolute value for a positive number $\mu_1$. \end{enumerate} Let $T$ be the space spanned by the elements of the form $\mathbf{u}_i\mathbf{y}^{\top}$ and $\mathbf{x}\mathbf{v}^{\top}_i$, for $1 \leq i \leq k$, where $\mathbf{x}$ and $\mathbf{y}$ are arbitrary $n$-dimensional vectors. Let $T^{\perp}$ be the orthogonal complement to the space $T$, and let $\textbf{P}_T$ be the orthogonal projection onto the subspace $T$ given by \[ \textbf{P}_T(\textbf{Z}) = \textbf{P}_{\textbf{U}}\textbf{Z} + \textbf{Z}\textbf{P}_{\textbf{V}} - \textbf{P}_{\textbf{U}}\textbf{Z}\textbf{P}_{\textbf{V}}. \] The following proposition shows that for any matrix $\textbf{Z} \in T$, it is a zero matrix if enough amount of its entries are zero. \begin{prop} Let $\Omega$ be a set of $m$ entries sampled uniformly at random from $[1,\ldots, n]\times[1,\ldots, n]$, and $\textbf{P}_{\Omega}(\textbf{Z})$ projects matrix $\textbf{Z}$ onto the subset $\Omega$. If $m > m_0$, where $m_0 = C_R^2\mu_0rn\beta\log n$ with $\beta > 1$ and $C_R$ being a positive constant, then for any $\textbf{Z} \in T$ with $\textbf{P}_{\Omega}(\textbf{Z}) = 0$, we have $\textbf{Z} = 0$ with probability $1 - 3n^{-\beta}$. \end{prop} \begin{proof} According to the Theorem 3.2 in \cite{candes2010power}, for any $\textbf{Z} \in T$, with a probability at least $1 - 2n^{2 - 2\beta}$, we have \begin{eqnarray}\label{eqn:4} \|\textbf{P}_T(\textbf{Z})\|_F - \delta \|\textbf{Z}\|_F \leq \frac{n^2}{m}\|\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T(\textbf{Z})\|_F^2 = 0 \end{eqnarray} where $\delta = m_0/m < 1$. Since $\textbf{Z} \in T$, we have $P_T(\textbf{Z}) = \textbf{Z}$. Then from (\ref{eqn:4}), we have $\|\textbf{Z}\|_F \leq 0 $ and thus $\textbf{Z} = 0$. \end{proof} In the following, we will develop a theorem for the dual certificate that guarantees the unique optimal solution to the following optimization problem \begin{eqnarray}\label{eqn:pro_appendix} &\min\limits_{\textbf{X},\ \textbf{E}} & \|\textbf{X}\|_* + \lambda \|\textbf{E}\|_1\\ \label{eqn:B_app} & \mbox{s.t.}& \textbf{P}_{\Omega}(\textbf{X}+\textbf{E}) = \textbf{P}_{\Omega}(\textbf{Y}). \nonumber \end{eqnarray} \begin{thm}\label{thm:1} Suppose we observe $m_1$ entries of $\textbf{X}$ with locations sampled uniformly at random, denoted by $\Omega$. We further assume that $m_2$ entries randomly sampled from $m_1$ observed entries are corrupted, denoted by $\Delta$. Suppose that $\textbf{P}_{\Omega}(\textbf{Y}) = \textbf{P}_{\Omega}(\textbf{X} + \textbf{E})$ and the number of observed correct entries $m_1 - m_2 > m_0=C_R^2\mu_0rn\beta\log n$. Then, for any $\beta > 1$, with a probability at least $1 - 3n^{-\beta}$, the underlying true matrices $(\textbf{X}, \textbf{E})$ is the unique optimizer of (\ref{eqn:pro_appendix}) if both assumptions {\bf A1} and {\bf A2} are satisfied and there exists a dual $\textbf{Q} \in \mathbb{R}^{n\times n}$ such that (a) $\textbf{Q} = \textbf{P}_{\Omega}(\textbf{Q})$, (b) $\textbf{P}_T(\textbf{Q}) = \textbf{U}\textbf{V}^{\top}$, (c) $\|\textbf{P}_{T^{\top}}(\textbf{Q})\| < 1$, (d) $\textbf{P}_{\Delta}(\textbf{Q}) = \lambda\ \mbox{sgn}(\textbf{E})$, and (e) $\|\textbf{P}_{\Delta^c}(\textbf{Q})\|_{\infty} < \lambda$. \end{thm} \begin{proof} First, the existence of $\textbf{Q}$ satisfying the conditions (a) to (e) ensures that $(\textbf{X}, \textbf{E})$ is an optimal solution. We only need to show its uniqueness and we prove it by contradiction. Assume there exists another optimal solution $(\textbf{X}+\textbf{N}_\textbf{X}, \textbf{E}+\textbf{N}_\textbf{E})$, where $\textbf{P}_{\Omega}(\textbf{N}_\textbf{X} + \textbf{N}_\textbf{E}) = 0$. Then we have \begin{eqnarray*} \|\textbf{X}+\textbf{N}_\textbf{X}\|_* + \lambda \|\textbf{E}+\textbf{N}_\textbf{E}\|_1 & \geq & \|\textbf{X}\|_* +\lambda \|\textbf{E}\|_1 + \langle \textbf{Q}_\textbf{E}, \textbf{N}_\textbf{E} \rangle + \langle \textbf{Q}_\textbf{X}, \textbf{N}_\textbf{X} \rangle \end{eqnarray*} where $\textbf{Q}_\textbf{E}$ and $\textbf{Q}_\textbf{X}$ satisfying $\textbf{P}_{\Delta}(\textbf{Q}_\textbf{E}) = \lambda\ \mbox{sgn}(\textbf{E})$, $\|\textbf{P}_{\Delta^c}(\textbf{Q}_\textbf{E})\|_{\infty} \leq \lambda$, $\textbf{P}_T(\textbf{Q}_\textbf{X}) = \textbf{U}\textbf{V}^{\top}$ and $\|\textbf{P}_{T^{\perp}}(\textbf{Q}_\textbf{X})\| \leq 1$. As a result, we have \begin{eqnarray*} & & \lambda \|\textbf{E}+\textbf{N}_\textbf{E}\|_1 + \|\textbf{X}+\textbf{N}_\textbf{X}\|_* \\ & \geq & \lambda \|\textbf{E}\|_1 + \|\textbf{X}\|_* + \langle \textbf{Q} + \textbf{P}_{\Delta^c}(\textbf{Q}_\textbf{E}) - \textbf{P}_{\Delta^c}(\textbf{Q}), \textbf{N}_\textbf{E} \rangle + \langle \textbf{Q} + \textbf{P}_{T^{\perp}}(\textbf{Q}_\textbf{X}) - \textbf{P}_{T^{\perp}}(\textbf{Q}), \textbf{N}_\textbf{X} \rangle \\ & = & \lambda \|\textbf{E}\|_1 + \|\textbf{X}\|_* + \langle \textbf{Q}, \textbf{N}_\textbf{E} + \textbf{N}_\textbf{X} \rangle + \langle \textbf{P}_{\Delta^c}(\textbf{Q}_\textbf{E}) - \textbf{P}_{\Delta^c}(\textbf{Q}), \textbf{N}_\textbf{E} \rangle + \langle \textbf{P}_{T^{\perp}}(\textbf{Q}_\textbf{X}) - \textbf{P}_{T^{\perp}}(\textbf{Q}), \textbf{N}_\textbf{X} \rangle \\ & = & \lambda \|\textbf{E}\|_1 + \|\textbf{X}\|_* + \langle \textbf{P}_{\Delta^c}(\textbf{Q}_\textbf{E}) - \textbf{P}_{\Delta^c}(\textbf{Q}), \textbf{P}_{\Delta^c}(\textbf{N}_\textbf{E}) \rangle + \langle \textbf{P}_{T^{\perp}}(\textbf{Q}_\textbf{X}) - \textbf{P}_{T^{\perp}}(\textbf{Q}), \textbf{P}_{T^{\perp}}(\textbf{N}_\textbf{X}) \rangle \end{eqnarray*} We then choose $\textbf{P}_{\Delta^c}(\textbf{Q}_\textbf{E})$ and $\textbf{P}_{T^{\perp}}(\textbf{Q}_\textbf{X})$ to be such that $\langle \textbf{P}_{\Delta^c}(\textbf{Q}_\textbf{E}), \textbf{P}_{\Delta^c}(\textbf{N}_\textbf{E}) \rangle = \lambda \|\textbf{P}_{\Delta^c}(\textbf{N}_\textbf{E})\|_1$ and $\langle \textbf{P}_{T^{\perp}}(\textbf{Q}_\textbf{X}), \textbf{P}_{T^{\perp}}(\textbf{N}_\textbf{X}) \rangle = \|\textbf{P}_{T^{\perp}}(\textbf{N}_\textbf{X})\|_{*}$. We thus have \begin{eqnarray*} & & \lambda \|\textbf{E}+\textbf{N}_\textbf{E}\|_1 + \|\textbf{X}+\textbf{N}_\textbf{X}\|_*\\ & \geq &\lambda \|\textbf{E}\|_1 + \|\textbf{X}\|_* + (\lambda - \|\textbf{P}_{\Delta^c}(\textbf{Q})\|_{\infty}) \|\textbf{P}_{\Delta^c}(\textbf{N}_\textbf{E})\|_1 + (1 - \|\textbf{P}_{T^{\perp}}(\textbf{Q})\|)\|\textbf{P}_{T^{\perp}}(\textbf{N}_\textbf{X})\|_{*} \end{eqnarray*} Since $(\textbf{X}+\textbf{N}_\textbf{X}, \textbf{E}+\textbf{N}_\textbf{E})$ is also an optimal solution, we have $\|\textbf{P}_{\Omega^c}(\textbf{N}_E)\|_1 = \|\textbf{P}_{T^{\perp}}(\textbf{N}_\textbf{X})\|_{*}$, leading to $\textbf{P}_{\Omega^c}(\textbf{N}_\textbf{E}) = \textbf{P}_{T^{\perp}}(\textbf{N}_\textbf{X}) = 0$, or $\textbf{N}_\textbf{X} \in T$. Since $\textbf{P}_{\Omega}(\textbf{N}_\textbf{X} + \textbf{N}_\textbf{E}) = 0$, we have $\textbf{N}_\textbf{X} = \textbf{N}_\textbf{E} + \textbf{Z}$, where $P_{\Omega}(\textbf{Z}) = 0$ and $\textbf{P}_{\Omega^c}(\textbf{N}_\textbf{E}) = 0$. Hence, $\textbf{P}_{\Omega^c \cap \Omega}(\textbf{N}_\textbf{X}) = 0$, where $|\Omega^c \cap \Omega| = m_1 - m_2$. Since $m_1 - m_2 > m_0$, according to Proposition 1, we have, with a probability $1 - 3n^{-\beta}$, $\textbf{N}_\textbf{X} = 0$. Besides, since $\textbf{P}_{\Omega}(\textbf{N}_\textbf{X}+\textbf{N}_\textbf{E}) = \textbf{P}_{\Omega}(\textbf{N}_\textbf{E}) = 0$ and $\Delta \subset \Omega$, we have $\textbf{P}_{\Delta}(\textbf{N}_\textbf{E}) = 0$. Since $\textbf{N}_\textbf{E} = \textbf{P}_{\Delta}(\textbf{N}_\textbf{E}) + \textbf{P}_{\Delta^c}(\textbf{N}_\textbf{E})$, we have $\textbf{N}_\textbf{E} = 0$, which leads to the contradiction. \end{proof} Given Theorem~\ref{thm:1}, we are now ready to prove Theorem 3.1. \begin{proof} The key to the proof is to construct the matrix $\textbf{Q}$ that satisfies the conditions (a)-(e) specified in Theorem~\ref{thm:1}. First, according to Theorem~\ref{thm:1}, when $m_1 - m_2 > m_0=C_R^2\mu_0rn\beta\log n$, with a probability at least $1 - 3n^{-\beta}$, mapping $\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T(\textbf{Z}): T \mapsto T$ is an one to one mapping and therefore its inverse mapping, denoted by $(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}$ is well defined. Similar to the proof of Theorem 2 in~\cite{chandrasekaran2011rank}, we construct the dual certificate $\textbf{Q}$ as follows \[ \textbf{Q} = \lambda\ \mbox{sgn}(\textbf{E}) + \epsilon_{\Delta} + \textbf{P}_{\Delta}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}(\textbf{U}\textbf{V}^{\top} + \epsilon_T) \] where $\epsilon_T \in T$ and $\epsilon_{\Delta} = \textbf{P}_{\Delta}(\epsilon_{\Delta})$. We further define \begin{eqnarray*} \textbf{H} & = & \textbf{P}_{\Omega}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}(\textbf{U}\textbf{V}^{\top}) \\ \textbf{F} & = & \textbf{P}_{\Omega}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}(\epsilon_{T}) \end{eqnarray*} Evidently, we have $\textbf{P}_{\Omega}(\textbf{Q}) = \textbf{Q}$ since $\Delta \subset \Omega$, and therefore the condition (a) is satisfied. To satisfy the conditions (b)-(e), we need \begin{eqnarray} \textbf{P}_T(\textbf{Q}) = \textbf{U}\textbf{V}^{\top} & \rightarrow & \epsilon_T = -\textbf{P}_T(\lambda\ \mbox{sgn}(\textbf{E}) + \epsilon_{\Delta}) \label{eqn:c1}\\ \|\textbf{P}_{T^{\perp}}(\textbf{Q})\| < 1 & \rightarrow & \mu(\textbf{E})\left(\lambda + \|\epsilon_{\Delta}\|_{\infty}\right) + \|\textbf{P}_{T^{\perp}}(\textbf{H})\| + \|\textbf{P}_{T^{\perp}}(\textbf{F})\| < 1\label{eqn:c2} \\ \textbf{P}_{\Delta}(\textbf{Q}) = \lambda\ \mbox{sgn}(\textbf{E}) & \rightarrow & \epsilon_{\Delta} = - \textbf{P}_{\Delta}(\textbf{H} + \textbf{F}) \label{eqn:c3} \\ |\textbf{P}_{\Delta^c}(\textbf{Q})|_{\infty} < \lambda & \rightarrow & \xi(\textbf{X})(1 + \|\epsilon_{T}\|) < \lambda \label{eqn:c4} \end{eqnarray} Below, we will first show that there exist solutions $\epsilon_T \in T$ and $\epsilon_{\Delta}$ that satisfy conditions (\ref{eqn:c1}) and (\ref{eqn:c3}). We will then bound $\|\epsilon_{\Omega}\|_{\infty}$, $\|\epsilon_T\|$, $\|\textbf{P}_{T^{\perp}}(\textbf{H})\|$, and $\|\textbf{P}_{T^{\perp}}(\textbf{F})\|$ to show that with sufficiently small $\mu(\textbf{E})$ and $\xi(\textbf{X})$, and appropriately chosen $\lambda$, conditions (\ref{eqn:c2}) and (\ref{eqn:c4}) can be satisfied as well. First, we show the existence of $\epsilon_{\Delta}$ and $\epsilon_T$ that obey the relationships in (\ref{eqn:c1}) and (\ref{eqn:c3}). It is equivalent to show that there exists $\epsilon_T$ that satisfies the following relation \[ \epsilon_T = -\textbf{P}_T(\lambda\ \mbox{sgn}(\textbf{E})) + \textbf{P}_T\textbf{P}_{\Delta}(\textbf{H}) + \textbf{P}_T\textbf{P}_{\Delta}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}(\epsilon_T) \] or \[ \textbf{P}_T\textbf{P}_{\Omega\setminus\Delta}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}(\epsilon_T) = -\textbf{P}_T(\lambda\ \mbox{sgn}(\textbf{E})) + \textbf{P}_T\textbf{P}_{\Delta}(\textbf{H}), \] where $\Omega\setminus\Delta$ indicates the complement set of set $\Delta$ in $\Omega$ and $|\Omega\setminus\Delta|$ denotes its cardinality. Similar to the previous argument, when $|\Omega\setminus\Delta| = m_1 - m_2 > m_0$, with a probability $1 - 3n^{-\beta}$, $\textbf{P}_T\textbf{P}_{\Omega\setminus\Delta}\textbf{P}_T(\textbf{Z}): T \mapsto T$ is an one to one mapping, and therefore $(\textbf{P}_T\textbf{P}_{\Omega\setminus\Delta}\textbf{P}_T(\textbf{Z}))^{-1}$ is well defined. Using this result, we have the following solution to the above equation \begin{eqnarray*} \epsilon_T & = & \textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega\setminus\Delta}\textbf{P}_T)^{-1}\left(-\textbf{P}_T(\lambda\ \mbox{sgn}(\textbf{E})) + \textbf{P}_T\textbf{P}_{\Delta}(\textbf{H}) \right) \end{eqnarray*} We now bound $\|\epsilon_T\|$ and $\|\epsilon_{\Delta}\|_{\infty}$. Since $\|\epsilon_T\| \leq \|\epsilon_T\|_F$, we bound $\|\epsilon_T\|_F$ instead. First, according to Corollary 3.5 in~\cite{candes2010power}, when $\beta = 4$, with a probability $1 - n^{-3}$, for any $\textbf{Z} \in T$, we have \[ \left\|\textbf{P}_{T^{\perp}}\textbf{P}_{\Omega}\textbf{P}_T(\textbf{P}_T\textbf{P}_{\Omega}\textbf{P}_T)^{-1}(\textbf{Z})\right\|_F \leq \|\textbf{Z}\|_F. \] Using this result, we have \begin{eqnarray*} \|\epsilon_{\Delta}\|_{\infty} & \leq & \xi(\textbf{X})\left(\|\textbf{H}\| + \|\textbf{F}\|\right) \\ & \leq & \xi(\textbf{X})\left(1 + \|\textbf{P}_{T^{\perp}}(\textbf{H})\|_F + \|\epsilon_T\| + \|\textbf{P}_{T^{\perp}}(\textbf{F})\|_F\right) \\ & \leq & \xi(\textbf{X})\left(2 + \|\epsilon_T\| + \|\epsilon_T\|_F\right) \\ & \leq & \xi(\textbf{X})\left[2 + (2k+1)\|\epsilon_T\|\right] \end{eqnarray*} In the last step, we use the fact that $\mbox{rank}(\epsilon_T) \leq 2k$ if $\epsilon_T \in T$. We then proceed to bound $\|\epsilon_T\|$ as follows \begin{eqnarray*} \|\epsilon_T\| & \leq & \mu(\textbf{E})\left(\lambda + \|\epsilon_{\Delta}\|_{\infty}\right) \end{eqnarray*} Combining the above two inequalities together, we have \begin{eqnarray*} \|\epsilon_T\| & \leq & \xi(\textbf{X})\mu(\textbf{E})(2k + 1)\|\epsilon_T\| + 2\xi(\textbf{X})\mu(\textbf{E}) + \lambda \mu(\textbf{E}) \\ \|\epsilon_{\Delta}\|_{\infty} & \leq & \xi(\textbf{X})\left[2 + (2k+1)\mu(\textbf{E})(\lambda + \|\epsilon_{\Delta}\|_{\infty}\right), \end{eqnarray*} which lead to \begin{eqnarray*} \|\epsilon_T\| & \leq & \frac{\lambda \mu(\textbf{E}) + 2\xi(\textbf{X})\mu(\textbf{E})}{1 - (2k+1)\xi(\textbf{X})\mu(\textbf{E})} \\ \|\epsilon_{\Delta}\|_{\infty} & \leq & \frac{2\xi(\textbf{X}) + (2k+1)\lambda\xi(\textbf{X})\mu(\textbf{E})}{1 - (2k+1)\xi(\textbf{X})\mu(\textbf{E})} \end{eqnarray*} Using the bound for $\|\epsilon_{\Delta}\|_{\infty}$ and $\|\epsilon_T\|$, we now check the condition (\ref{eqn:c2}) \begin{eqnarray*} 1 & > & \mu(\textbf{E})\left(\lambda + |\epsilon_{\Delta}|_{\infty}\right) + \frac{1}{2} + \frac{k}{2}\|\epsilon_T\| \end{eqnarray*} or \[ \lambda < \frac{1 - \xi(\textbf{X})\mu(\textbf{E})(4k + 5)}{\mu(\textbf{E})(k+2)} \] For the condition (\ref{eqn:c4}), we have \[ \lambda > \xi(\textbf{X}) + \xi(\textbf{X})\|\epsilon_T\| \] or \[ \lambda > \frac{\xi(\textbf{X}) - (2k - 1)\xi^2(\textbf{X})\mu(\textbf{E})}{1 - 2(k+1)\xi(\textbf{X})\mu(\textbf{E})} \] To ensure that there exists $\lambda \geq 0$ satisfies the above two conditions, we have \[ 1 - 5(k+1)\xi(\textbf{X})\mu(\textbf{E}) + (10k^2+21k+8)[\xi(X)\mu(\textbf{E})]^2 > 0 \] and \[ 1 - \xi(\textbf{X})\mu(\textbf{E})(4k + 5) \geq 0 \] Since the first condition is guaranteed to be satisfied for $k \geq 1$, we have \[ \xi(\textbf{X})\mu(\textbf{E}) \leq \frac{1}{4k + 5}. \] Thus we finish the proof. \end{proof} \section*{Appendix D: Data Statistics} We listed the detailed domains of the sentiment analysis tasks in Table \ref{tab:sa_data}. We removed the \emph{musical\_instruments} and \emph{tools\_hardware} domains from the original data because they have too few labeled examples. The statistics for the 10 target tasks of intent classification in Table \ref{tab:nlu_data}. \begin{table*}[th] \centering \vspace{0.1 in} \begin{tabular}{|c|c|c|c|} \hline {\bf Domains} & {\bf \#train} &{\bf \#validation} & {\bf \#test} \\ \hline apparel & 7398 & 926 & 928 \\ automotive & 601 & 69 & 66 \\ baby & 3405 & 437 & 414 \\ beauty & 2305 & 280 & 299 \\ books & 19913 & 2436 & 2489 \\ camera\_photo & 5915 & 744 & 749 \\ cell\_phones\_service & 816 & 109 & 98 \\ computer\_video\_games & 2201 & 274 & 296 \\ dvd & 19961 & 2624 & 2412 \\ electronics & 18431 & 2304 & 2274 \\ gourmet\_food & 1227 & 182 & 166 \\ grocery & 2101 & 268 & 263 \\ health\_personal\_care & 5826 & 687 & 712 \\ jewelry\_watches & 1597 & 188 & 196 \\ kitchen\_housewares & 15888 & 1978 & 1990 \\ magazines & 3341 & 427 & 421 \\ music & 20103 & 2463 & 2510 \\ office\_products & 337 & 54 & 40 \\ outdoor\_living & 1321 & 143 & 135 \\ software & 1934 & 254 & 202 \\ sports\_outdoors & 4582 & 566 & 580 \\ toys\_games & 10634 & 1267 & 1246 \\ video & 19941 & 2519 & 2539 \\ \hline \end{tabular} \caption{Statistics of the Multi-Domain Sentiment Classification Data.}\label{tab:sa_data} \end{table*} \begin{table*}[th] \centering \vspace{0.1 in} \begin{tabular}{|c|c|c|} \hline {\bf Dataset ID} & {\bf \#labeled instances} &{\bf \#labels} \\ \hline 1 & 497 & 11 \\ 2 & 3071 & 14 \\ 3 & 305 & 21 \\ 4 & 122 & 7 \\ 5 & 110 & 11 \\ 6 & 126 & 12 \\ 7 & 218 & 45 \\ 8 & 297 & 10 \\ 9 & 424 & 4 \\ 10 & 110 & 17 \\ \hline \end{tabular} \caption{Statistics of the User Intent Classification Data.}\label{tab:nlu_data} \end{table*} \section{Introduction} Few-shot learning (FSL)~\cite{miller2000learning,li2006one,lake2015human} aims to learn classifiers from few examples per class. Recently, deep learning has been successfully exploited for FSL via learning meta-models from a large number of \textbf{meta-training tasks}. These meta-models can be then used for rapid-adaptation for the \textbf{target/meta-testing tasks} that only have few training examples. Examples of such meta-models include: (1) metric-/similarity-based models, which learn contextual, and task-specific similarity measures \cite{koch2015siamese,vinyals2016matching,snell2017prototypical}; and (2) optimization-based models, which receive the input of gradients from a FSL task and predict either model parameters or parameter updates~\citep{ravi2017optimization,munkhdalai2017meta,finn2017model,NIPS2017_7278}. In the past, FSL has mainly considered image domains, where all tasks are often sampled from one huge collection of data, such as Omniglot~\citep{lake2011one} and ImageNet~\citep{vinyals2016matching}, making tasks come from a single domain thus related. Due to such a simplified setting, almost all previous works employ a common meta-model (metric-/optimization-based) for all few-shot tasks. However, this setting is far from the realistic scenarios in many real-world applications of few-shot text classification. For example, on an enterprise AI cloud service, many clients submit various tasks to train text classification models for business-specific purposes. The tasks could be classifying customers' comments or opinions on different products/services, monitoring public reactions to different policy changes, or determining users' intents in different types of personal assistant services. As most of the clients cannot collect enough data, their submitted tasks form a few-shot setting. Also, these tasks are significantly diverse, thus a common metric is insufficient to handle all these tasks. We consider a more realistic FSL setting where tasks are diverse. In such a scenario, the optimal meta-model may vary across tasks. Our solution is based on the metric-learning approach \citep{snell2017prototypical} and the key idea is to maintain multiple metrics for FSL. The meta-learner selects and combines multiple metrics for learning the target task using \textbf{task clustering} on the meta-training tasks. During the meta-training, we propose to first partition the meta-training tasks into clusters, making the tasks in each cluster likely to be related. Then within each cluster, we train a deep embedding function as the metric. This ensures the common metric is only shared across tasks within the same cluster. Further, during meta-testing, each target FSL task is assigned to a task-specific metric, which is a linear combination of the metrics defined by different clusters. In this way, the diverse few-shot tasks can derive different metrics from the previous learning experience. The key of the proposed FSL framework is the task clustering algorithm. Previous works~\citep{kumar2012learning,kang2011learning,crammer2012learning,barzilai2015convex} mainly focused on convex objectives, and assumed the number of classes is the same across different tasks (\emph{e.g.} binary classification is often considered). To make task clustering (i) compatible with deep networks and (ii) able to handle tasks with a various number of labels, we propose a \textbf{matrix-completion based task clustering} algorithm. The algorithm utilizes task similarity measured by cross-task transfer performance, denoted by matrix $\textbf{S}$. The $(i,j)$-entry of $\textbf{S}$ is the estimated accuracy by adapting the learned representations on the $i$-th (source) task to the $j$-th (target) task. We rely on matrix completion to deal with missing and unreliable entries in $\textbf{S}$ and finally apply spectral clustering to generate the task partitions. To the best of our knowledge, our work is the first one addressing the diverse few-shot learning problem and reporting results on real-world few-shot text classification problems. The experimental results show that the proposed algorithm provides significant gains on few-shot sentiment classification and dialog intent classification tasks. It provides positive feedback on the idea of using multiple meta-models (metrics) to handle diverse FSL tasks, as well as the proposed task clustering algorithm on automatically detecting related tasks. \begin{figure*}[ht] \centering \includegraphics[scale=0.25]{cnn2.pdf} \caption{{The Convolutional Neural Networks (CNN) used in this work: (a) A CNN classifier. The encoder component takes the sentence as input and outputs a fixed-length sentence embedding vector; the classifier component predicts class labels with the sentence embedding. (b) A Matching Network, which only contains an encoder like in (a), and makes prediction via a k-Nearest-Neighbor classifier with the similarity defined by the encoder.} } \label{fig:basic_models} \end{figure*} \section{Problem Definition} \label{sec:notations} \paragraph{Few-Shot Learning} Since we focus on \textbf{diverse metric-based FSL}, the problem can be formulated in two stages: (1) \textbf{meta-training}, where a set of metrics $\mathcal{M}=\left \{ \Lambda_1, \cdots, \Lambda_K \right \}$ is learned on the \textbf{meta-training tasks} $\mathcal{T}$. Each $\Lambda_i$ maps two input $(x_1,x_2)$ to a scalar of similarity score. Here $\mathcal{T} = \left \{ \mathrm{T}_1, \mathrm{T}_2, \cdots, \mathrm{T}_N \right \}$ is a collection of $N$ tasks. Here $K$ is a pre-defined number (usually $K \ll N$). Each task $\mathrm{T}_i$ consists of training, validation, and testing set denoted as $\left \{ D^{train}_{i}, D^{valid}_{i}, D^{test}_{i} \right\}$, respectively. Note that the definition of $\mathcal{T}$ is a generalized version of $\mathcal{D}^{(meta-train)}$ in \citep{ravi2017optimization}, since each task $\mathrm{T}_i$ can be either few-shot (where $D^{valid}_{i}$ is empty) or regular\footnote{For example, the methods in \cite{triantafillou2017few} can be viewed as training meta-models from any sampled batches from one single meta-training dataset.}. (2) \textbf{meta-testing}: the trained metrics in $\mathcal{M}$ is applied to \textbf{meta-testing tasks} denoted as $\mathcal{T'} = \left \{ \mathrm{T'}_1, \cdots, \mathrm{T'}_{N'} \right \}$, where each $\mathrm{T'}_i$ is a few-shot learning task consisting of both training and testing data as $\left \{ D'^{train}_{i}, D'^{test}_{i} \right\}$. $D'^{train}_{i}$ is a small labeled set for generating the prediction model $\mathrm{M}'_i$ for each $\mathrm{T'_i}$. Specifically, $\mathrm{M}'_i$s are kNN-based predictors built upon the metrics in $\mathcal{M}$. We will detail the construction of $\mathrm{M}'_i$ in Section \ref{sec:methods}, Eq. (\ref{eqn:fsl}). It is worth mentioning that the definition of $\mathcal{T}'$ is the same as $\mathcal{D}^{(meta-test)}$ in \citep{ravi2017optimization}. The \textbf{performance of few-shot learning} is the macro-average of $\mathrm{M}'_i$'s accuracy on all the testing set $D'^{test}_i$s. Our definitions can be easily generalized to other meta-learning approaches \cite{ravi2017optimization,finn2017model,mishra2017simple}. The motivation of employing multiple metrics is that when the tasks are diverse, one metric model may not be sufficient. Note that previous metric-based FSL methods can be viewed as a special case of our definition where $\mathcal{M}$ only contains a single $\Lambda$, as shown in the two base model examples below. \paragraph{Base Model: Matching Networks} In this paper we use the metric-based model Matching Network (MNet)~\cite{vinyals2016matching} as the base metric model. The model (Figure \ref{fig:basic_models}b) consists of a neural network as the embedding function (\textbf{encoder}) and an augmented memory. The encoder, $f(\cdot)$, maps an input $x$ to a $d$-length vector. The learned metric $\Lambda$ is thus the similarity between the encoded vectors, $\Lambda(x_1,x_2)=f(x_1)^T f(x_2)$, i.e. the metric $\Lambda$ is modeled by the encoder $f$. The augmented memory stores a support set $S=\{(x_{i},y_{i})\}^{|S|}_{i=1}$, where $x_{i}$ is the supporting instance and $y_{i}$ is its corresponding label in a one-hot format. The MNet explicitly defines a classifier $\mathrm{M}$ conditioned on the supporting set $S$. For any new data $\hat{x}$, $\mathrm{M}$ predicts its label via a similarity function $\alpha(.,.)$ between the test instance $\hat{x}$ and the support set $S$: \begin{align} y = P(.|\hat{x}, S) = \sum_{i=1}^{|S|} \alpha(\hat{x}, x_{i};\theta) y_{i}, \label{eqn:base_mnet} \end{align} where we defined $\alpha(.,.)$ to be a softmax distribution given $\Lambda(\hat{x},x_i)$, where $x_{i}$ is a supporting instance, {\emph i.e.}, $\alpha(\hat{x}, x_{i};\theta) = \nicefrac{\exp(f(\hat{x})^T f(x_{i}))}{\sum_{j=1}^{|S|} \exp(f(\hat{x})^T f(x_{j}))}$, where $\theta$ are the parameters of the encoder $f$. Thus, $y$ is a valid distribution over the supporting set's labels $\{y_{i}\}_{i=1}^{|S|}$. To adapt the MNet to text classification, we choose encoder $f$ to be a convolutional neural network (CNN) following ~\cite{kim:2014:EMNLP2014,johnson2016supervised}. Figure \ref{fig:basic_models} shows the MNet with the CNN architecture. Following \citep{collobert2011natural,kim:2014:EMNLP2014}, the model consists of a convolution layer and a max-pooling operation over the entire sentence. To train the MNets, we first sample the training dataset $D$ for task ${T}$ from all tasks $\mathcal{T}$, with notation simplified as $D\sim \mathcal{T}$. For each class in the sampled dataset $D$, we sample $k$ random instances in that class to construct a support set $S$, and sample a batch of training instances $B$ as training examples, i.e., $B,S\sim D$. The training objective is to minimize the prediction error of the training samples given the supporting set (with regard to the encoder parameters $\theta$) as follows: \begin{equation} \mathop{\mathbb{E}}_{D\sim \mathcal{T}} \Big[ \mathop{\mathbb{E}}_{B,S\sim D} \big[ \sum_{(x,y)\in B} \log(P(y|x,S;\theta))\big] \Big]. \label{eqn:mnet_obj} \end{equation} \paragraph{Base Model: Prototypical Networks} Prototypical Network (ProtoNet)~\citep{snell2017prototypical} is a variation of Matching Network, which also depends on metric learning but builds the classifier $\mathrm{M}$ different from Eq. (\ref{eqn:base_mnet}): \begin{equation} y = P(.|\hat{x}, S) = \sum_{i=1}^{L} \alpha(\hat{x}, S_i;\theta) y_{i}. \label{eqn:base_protonet} \end{equation} $L$ is the number of classes and $S_i\mathrm{=}\{x|(x,y) \in S\wedge y\mathrm{=}y_i\}$ is the support set of class $y_i$. $\alpha(\hat{x}, S_{i};\theta) =\nicefrac{\exp\left( f(\hat{x})^T \sum_{x\in S_i} f(x) \right)}{\sum_{j=1}^{L} \exp \left(f(\hat{x})^T \sum_{x' \in S_j} f(x') \right)}$. \begin{figure*}[ht] \centering \includegraphics[scale=0.54]{illustration3.pdf} \vspace{-0.1in} \caption{{Overview of the idea of our multi-metric learning approach for few-shot learning. (a) an illustration of the sparse cross-tasks transfer-performance matrix with unobserved entries (white blocks) and unreliable values (top-right and bottom-left corners), where red colors indicate positive transfer and blue colors indicate negative transfer; (b) the constructed binary partially-observed matrix with low-rank constraint for matrix completion and clustering (see Section \ref{ssec:method_completion} for the details); (c) an encoder trained with the matching network objective Eq. (\ref{eqn:mnet_obj}) on a task cluster (tasks 1, 2 and 3 in the example).} } \label{fig:basic_idea} \end{figure*} \section{Methodology} \label{sec:methods} We propose a task-clustering framework to address the diverse few-shot learning problem stated in Section \ref{sec:notations}. We have the FSL algorithm summarized in Algorithm \ref{algo:taskcluster-fsl}. Figure \ref{fig:basic_idea} gives an overview of our idea. The initial step of the algorithm is a novel task clustering algorithm based on matrix completion, which is described in Section \ref{ssec:method_completion}. The few-shot learning method based on task clustering is then introduced in Section \ref{ssec:method_fsl}. \subsection{Robust Task Clustering by Matrix Completion} \label{ssec:method_completion} Our task clustering algorithm is shown in Algorithm \ref{algo:task-clustering}. The algorithm first evaluates the transfer performance by applying a single-task model $i$ to another task $j$ (Section \ref{sssec:encoder_transfer}), which will result in a (partially observed) cross-task transfer performance matrix $\textbf{S}$. The matrix $\textbf{S}$ is then cleaned and completed, giving a symmetry task similarity matrix $\textbf{Y}$ for spectral clustering \cite{ng2002spectral}. \subsubsection{Estimation of Cross-Task Transfer Performance} \label{sssec:encoder_transfer} Using single-task models, we can compute performance scores $s_{ij}$ by adapting each $\mathrm{M}_i$ to each task $T_j (j\neq i)$. This forms an $n \times n$ pair-wise classification performance matrix $\textbf{S}$, called the \emph{transfer-performance matrix}. Note that $\textbf{S}$ is asymmetric since usually $\textbf{S}_{ij} \neq \textbf{S}_{ji}$. \begin{algorithm}[ht] \small { \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{$N$ meta-training tasks $ \mathcal{T}$=$\left \{ \mathrm{T}_1, \mathrm{T}_2, \cdots, \mathrm{T}_n \right \}$; number of clusters $K$; $N'$ target few-shot meta-testing tasks $\mathcal{T}'$} \Output{Meta-model $\mathcal{M} = \{ C_{1:K}\ (K\ \textrm{task clusters})$, $\mathcal{F} = \left \{ f_1,f_2, \cdots, f_K \right \} \ (K\ \textrm{task encoders})\}$ . One classifier $\mathrm{M'}_{i}$ for each target task $\mathrm{T}'$.} \DontPrintSemicolon \BlankLine \textbf{Robust Task Clustering}: $C_{1:K}$ = \textsc{RobustTC}($\mathcal{T}$,$K$) (Algorithm \ref{algo:task-clustering}) \; \textbf{Cluster-Model Training}: Train one encoder (multi-task MNet) $f_i$ on each task cluster $C_i$ (Section \ref{sssec:method_meta_model})\; \textbf{Few-Shot Learning on Cluster-models}: Train a model $\mathrm{M}_{trg}$ on task $\mathrm{T}_{trg}$ with the method in Section \ref{sssec:method_fsl}. \caption{\label{algo:taskcluster-fsl}{\textsc{RobustTC}-FSL: Task Clustering for Few-Shot Learning}}} \end{algorithm} Ideally, the transfer performance could be estimated by training a MNet on task $i$ and directly evaluating it on task $j$. However, the limited training data usually lead to generally low transfer performance of single-task MNet. As a result we adopt the following approach to estimate $\textbf{S}$: We train a CNN classifier (Figure \ref{fig:basic_models}(a)) on task $i$, then take only the encoder $\mathrm{M}^{enc}_i$ from $\mathrm{M}_i$ and freeze it to train a classifier on task $j$. This gives us a new task $j$ model, and we test this model on $D^{valid}_j$ to get the accuracy as the transfer-performance $\textbf{S}_{ij}$. The score shows how the representations learned on task $i$ can be adapted to task $j$, thus indicating the similarity between tasks. \paragraph{Remark: Out-of-Vocabulary Problem} In text classification tasks, transferring an encoder with fine-tuned word embeddings from one task to another is difficult as there can be a significant difference between the two vocabularies. Hence, while learning the single-task CNN classifiers, we always make the word embeddings fixed. \setlength{\textfloatsep}{0pt} \begin{algorithm}[t] \small { \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{A set of $n$ tasks $ \mathcal{T} = \left \{ \mathrm{T}_1, \mathrm{T}_2, \cdots, \mathrm{T}_n \right \}$, number of task clusters $K$} \Output{$K$ task clusters $C_{1:K}$} \DontPrintSemicolon \BlankLine \textbf{Learning of Single-Task Models}: train single-task models $\mathrm{M}_i$ for each task $\mathrm{T}_i$\; \textbf{Evaluation of Transfer-Performance Matrix}: get performance matrix $\mathbf{\textbf{S}}$ (Section \ref{sssec:encoder_transfer})\; \textbf{Score Filtering}: Filter the uncertain scores in $\textbf{S}$ and construct the symmetric matrix $\textbf{Y}$ using Eq. (\ref{eqn:A})\; \textbf{Matrix Completion}: Complete the similar matrix $\textbf{X}$ from $\textbf{Y}$ using Eq. (\ref{eqn:pro}) \; \textbf{Task Clustering}: $C_{1:K}$=SpectralClustering$(\textbf{X}, K)$\; \caption{\label{algo:task-clustering}{\textsc{RobustTC}: Robust Task Clustering based on Matrix Completion}}} \end{algorithm} \subsubsection{Task Clustering Method} \label{sssec:clustering_method} Directly using the transfer performance for task clustering may suffer from both efficiency and accuracy issues. First, evaluation of all entries in the matrix $\textbf{S}$ involves conducting the source-target transfer learning $O(n^2)$ times, where $n$ is the number of meta-training tasks. For a large number of diverse tasks where the $n$ can be larger than 1,000, evaluation of the full matrix is unacceptable (over 1M entries to evaluate). Second, the estimated cross-task performance (i.e. some $\textbf{S}_{ij}$ or $\textbf{S}_{ji}$ scores) is often unreliable due to small data size or label noise. When the number of the uncertain values is large, they can collectively mislead the clustering algorithm to output an incorrect task-partition. To address the aforementioned challenges, we propose a novel task clustering algorithm based on the theory of matrix completion~\citep{candes2010power}. Specifically, we deal with the huge number of entries by randomly sample task pairs to evaluate the $\textbf{S}_{ij}$ and $\textbf{S}_{ji}$ scores. Besides, we deal with the unreliable entries and asymmetry issue by keeping only task pairs $(i,j)$ with consistent $\textbf{S}_{ij}$ and $\textbf{S}_{ji}$ scores. as will be introduced in Eq. (\ref{eqn:A}). Below, we describe our method in detail. \paragraph{Score Filtering} First, we use only reliable task pairs to generate a {\it partially-observed} similarity matrix $\textbf{Y}$. Specifically, if $\textbf{S}_{ij}$ and $\textbf{S}_{ji}$ are high enough, then it is likely that tasks $\{i,j\}$ belong to a same cluster and share significant information. Conversely, if $\textbf{S}_{ij}$ and $\textbf{S}_{ji}$ are low enough, then they tend to belong to different clusters. To this end, we need to design a mechanism to determine if a performance is high or low enough. Since different tasks may vary in difficulty, a fixed threshold is not suitable. Hence, we define a dynamic threshold using the mean and standard deviation of the target task performance, i.e., $\mu_j = \text{mean}(\textbf{S}_{:j})$ and $\sigma_j=\text{std}(\textbf{S}_{:j})$, where $\textbf{S}_{:j}$ is the $j$-th column of $\textbf{S}$. We then introduce two positive parameters $p_1$ and $p_2$, and define high and low performance as $\textbf{S}_{ij}$ greater than $\mu_j + p_1 \sigma_j$ or lower than $\mu_j - p_2 \sigma_j$, respectively. When both $\textbf{S}_{ij}$ and $\textbf{S}_{ji}$ are high and low enough, we set their pairwise similarity as $1$ and $0$, respectively. Other task pairs are treated as uncertain task pairs and are marked as unobserved, and don't influence our clustering method. This leads to a partially-observed symmetric matrix $\textbf{Y}$, i.e., \begin{eqnarray} \small \textbf{Y}_{ij}\mathrm{=}\textbf{Y}_{ji}\mathrm{=}\left\{ \begin{array}{ll} \multirow{2}{*}{1} & \text{if}\ \ \textbf{S}_{ij} > \mu_j + p_1 \sigma_j\ \ \\ &\text{and}\ \ \textbf{S}_{ji} > \mu_i + p_1 \sigma_i\\ \multirow{2}{*}{0} & \text{if}\ \ \textbf{S}_{ij} < \mu_j - p_2 \sigma_j\ \ \\ &\text{and}\ \ \textbf{S}_{ji} < \mu_i - p_2 \sigma_i\\ \mathrm{unobserved} & \mathrm{otherwise} \end{array} \right. \label{eqn:A} \end{eqnarray} \paragraph{Matrix Completion} Given the partially observed matrix $\textbf{Y}$, we then reconstruct the full similarity matrix $\textbf{X} \in \mathbb{R}^{n\times n}$. We first note that the similarity matrix $\textbf{X}$ should be of low-rank (proof deferred to appendix). Additionally, since the observed entries of $\textbf{Y}$ are generated based on high and low enough performance, it is safe to assume that most observed entries are correct and only a few may be incorrect. Therefore, we introduce a sparse matrix $\textbf{E}$ to capture the observed incorrect entries in $\textbf{Y}$. Combining the two observations, $\textbf{Y}$ can be decomposed into the sum of two matrices $\textbf{X}$ and $\textbf{E}$, where $\textbf{X}$ is a low rank matrix storing similarities between task pairs, and $\textbf{E}$ is a sparse matrix that captures the errors in $\textbf{Y}$. The matrix completion problem can be cast as the following convex optimization problem: \begin{eqnarray}\label{eqn:pro} &\min\limits_{\textbf{X},\ \textbf{E}} & \|\textbf{X}\|_* + \lambda \|\textbf{E}\|_1\\ \label{eqn:B} & \mbox{s.t.}& \textbf{P}_{\Omega}(\textbf{X}+\textbf{E}) = \textbf{P}_{\Omega}(\textbf{Y}), \nonumber \end{eqnarray} where $\|\circ\|_*$ denotes the matrix nuclear norm, the convex surrogate of rank function. $\Omega$ is the set of observed entries in $\textbf{Y}$, and $\textbf{P}_{\Omega}:\mathbb{R}^{n\times n} \mapsto \mathbb{R}^{n\times n}$ is a matrix projection operator defined as \begin{eqnarray} [\textbf{P}_{\Omega}(\textbf{A})]_{ij} = \left\{ \begin{array}{ll} \textbf{A}_{ij} & \text{if}\ (i,j) \in \Omega \nonumber\\ 0 & \mbox{otherwise}\nonumber \end{array} \right. \label{eqn:p} \end{eqnarray} Finally, we apply spectral clustering on the matrix $\textbf{X}$ to get the task clusters. \paragraph{Remark: Sample Efficiency} In the Appendix A, we show a Theorem~\ref{thm:perfect-recovery} as well as its proof, implying that under mild conditions, the problem (\ref{eqn:pro}) can perfectly recover the underlying similarity matrix $\textbf{X}^*$ if the number of observed correct entries is at least $O(n \log^2 n)$. This theoretical guarantee implies that for a large number $n$ of training tasks, only a tiny fraction of all task pairs is needed to reliably infer similarities over all task pairs. \subsection{Few-Shot Learning with Task Clusters} \label{ssec:method_fsl} \subsubsection{Training Cluster Encoders} \label{sssec:method_meta_model} For each cluster $C_k$, we train a multi-task MNet model (Figure~\ref{fig:basic_models}(b)) with all tasks in that cluster to encourage parameter sharing. The result, denoted as $f_k$ is called the \textbf{cluster-encoder} of cluster $C_k$. The $k$-th metric of the cluster is thus $\Lambda(x_1,x_2)=f_k(x_1)^{\intercal}f_k(x_2)$. \subsubsection{Adapting Multiple Metrics for Few-Shot Learning} \label{sssec:method_fsl} To build a predictor $\mathrm{M}$ with access to only a limited number of training samples, we make the prediction probability by linearly combining prediction from learned cluster-encoders: \begin{align} p(y|x) = \sum_k \alpha_k P(y|x; f_k). \label{eqn:fsl} \end{align} where $f_k$ is the learned (and frozen) encoder of the $k$-th cluster, $\{\alpha_{k}\}_{k=1}^{K}$ are adaptable parameters trained with few-shot training examples. And the predictor $P(y|x; f_k)$ from each cluster is \begin{eqnarray} \small P(y=y_l|x;f_k) = \frac{\exp\left \{ f_k (x_l)^{\intercal}f_k (x) \right \} }{\sum_{i} \exp \left \{ f_k (x_{i})^{\intercal}f_k (x) \right \} } \end{eqnarray} $x_{l}$ is the corresponding training sample of label $y_{l}$. \paragraph{Remark: Joint Method versus Pipeline Method} End-to-end joint optimization on training data becomes a popular methodology for deep learning systems, but it is not directly applicable to diverse FSL. One main reason is that deep networks could easily fit any task partitions if we optimize on training loss only, making the learned metrics not generalize, as discussed in Section \ref{sec:related}. As a result, this work adopts a pipeline training approach and employing validation sets for task clustering. Combining reinforcement learning with meta-learning could be a potential solution to enable an end-to-end training for future work. \section{Tasks and Data Sets} We test our methods by conducting experiments on two text classification data sets. We used NLTK toolkit\footnote{\url{http://www.nltk.org/}} for tokenization. The task are divided into meta-training tasks and meta-testing tasks (target tasks), where the meta-training tasks are used for clustering and cluster-encoder training. The meta-testing tasks are few-shot tasks, which are used for evaluating the method in Eq. (\ref{eqn:fsl}). \subsection{Amazon Review Sentiment Classification} First, following \citet{barzilai2015convex}, we construct multiple tasks with the multi-domain sentiment classification~\citep{blitzer2007biographies} data set. The dataset consists of Amazon product reviews for 23 types of products (see Appendix D for the details). For each product domain, we construct three binary classification tasks with different thresholds on the ratings: the tasks consider a review as positive if it belongs to one of the following buckets $=5$ stars, $>=4$ stars or $>=2$ stars.\footnote{Data downloaded from \url{http://www.cs.jhu.edu/~mdredze/datasets/sentiment/}, in which the 3-star samples were unavailable due to their ambiguous nature \citep{blitzer2007biographies}.} These buckets then form the basis of the task-setup, giving us 23 $\times$ 3$=$69 tasks in total. For each domain we distribute the reviews uniformly to the 3 tasks. For evaluation, we select 12 (4$\times$3) tasks from 4 domains ({\it Books, DVD, Electronics, Kitchen}) as the meta-testing (target) tasks out of all 23 domains. For the target tasks, we create 5-shot learning problems. \subsection{Real-World Tasks: User Intent Classification for Dialog System} The second dataset is from an online service which trains and serves intent classification models to various clients. The dataset comprises recorded conversations between human users and dialog systems in various domains, ranging from personal assistant to complex service-ordering or customer-service request scenarios. During classification, intent-labels\footnote{In conversational dialog systems, intent-labels are used to guide the dialog-flow.} are assigned to user utterances (sentences). We use a total of 175 tasks from different clients, and randomly sample 10 tasks from them as our target tasks. For each meta-training task, we randomly sample 64\% data into a training set, 16\% into a validation set, and use the rest as the test set. The number of labels for these tasks varies a lot (from 2 to 100, see Appendix D for details), making regular $k$-shot settings not essentially limited-resource problems (e.g., 5-shot on 100 classes will give a good amount of 500 training instances). Hence, to adapt this to a FSL scenario, for target tasks we keep one example for each label (one-shot), plus 20 randomly picked labeled examples to create the training data. We believe this is a fairly realistic estimate of labeled examples one client could provide easily. \paragraph{Remark: Evaluation of the Robustness of Algorithm \ref{algo:task-clustering}} Our matrix-completion method could handle a large number of tasks via task-pair sampling. However, the sizes of tasks in the above two few-shot learning datasets are not too huge, so evaluation of the whole task-similarity matrix is still tractable. In our experiments, the incomplete matrices mainly come from the score-filtering step (see Eq. \ref{eqn:A}). Thus there is limited randomness involved in the generation of task clusters. To strengthen the conclusion, we evaluate our algorithm on an additional dataset with a much larger number of tasks. The results are reported in the multi-task learning setting instead of the few-shot learning setting focused in this paper. Therefore we put the results to a non-archive version of this paper\footnote{\url{https://arxiv.org/pdf/1708.07918.pdf}} for further reference. \section{Experiments} \subsection{Experiment Setup} \label{ssec:exp_setup} \paragraph{Baselines} We compare our method to the following baselines: (1) \textbf{Single-task CNN}: training a CNN model for each task individually; (2) \textbf{Single-task FastText}: training one FastText model~\citep{joulin2016bag} with fixed embeddings for each individual task; (3) \textbf{Fine-tuned the holistic MTL-CNN}: a standard transfer-learning approach, which trains one MTL-CNN model on all the training tasks offline, then fine-tunes the classifier layer (i.e. $\mathrm{M}^{(cls)}$ Figure \ref{fig:basic_models}(a)) on each target task; (4) \textbf{Matching Network}: a metric-learning based few-shot learning model trained on all training tasks; (5) \textbf{Prototypical Network}: a variation of matching network with different prediction function as Eq. \ref{eqn:base_protonet}; (6) \textbf{Convex combining all single-task models}: training one CNN classifier on each meta-training task individually and taking the encoder, then for each target task training a linear combination of all the above single-task encoders with Eq. (\ref{eqn:fsl}). This baseline can be viewed as a variation of our method without task clustering. We initialize all models with pre-trained 100-dim Glove embeddings (trained on 6B corpus)~\citep{pennington2014glove}. \begin{table*}[ht] \centering \begin{tabular}{l|cc} \hline \multirow{2}{*}{\bf Model} & \multicolumn{2}{c}{\bf Avg Acc} \\ & \bf Sentiment & \bf Intent \\ \hline (1) Single-task CNN w/pre-trained emb & 65.92 & 34.46 \\ (2) Single-task FastText w/pre-trained emb & 63.05 & 23.87 \\ (3) Fine-tuned holistic MTL-CNN & 76.56 & 30.36 \\ (4) Matching Network~\citep{vinyals2016matching} & 65.73 & 30.42 \\ (5) Prototypical Network~\citep{snell2017prototypical} & 68.15 & 31.51 \\ \hline (6) Convex combination of all single-task models & 78.85 & 34.43 \\ \hline \hline {\bf \textsc{RobustTC}-FSL} & \bf 83.12 & \bf 37.59\\ \hline {\bf Adaptive \textsc{RobustTC}-FSL} & - & {\bf 42.97}\\ \hline \end{tabular} \caption{Accuracy of FSL on sentiment classification (Sentiment) and dialog intent classification (Intent) tasks. The target tasks of sentiment classification are 5-shot ones; and each intent target task contains one training example per class and 20 random labeled examples.} \label{tab:main_exp} \vspace{-0.1 in} \end{table*} \paragraph{Hyper-Parameter Tuning} In all experiments, we set both $p_1$ and $p_2$ parameters in (\ref{eqn:A}) to $0.5$. This strikes a balance between obtaining enough observed entries in $\textbf{Y}$, and ensuring that most of the retained similarities are consistent with the cluster membership. The window/hidden-layer sizes of CNN and the initialization of embeddings (random or pre-trained) are tuned during the cluster-encoder training phase, with the validation sets of meta-training tasks. We have the CNN with window size of 5 and 200 hidden units. The single-metric FSL baselines have 400 hidden units in the CNN encoders. On sentiment classification, all cluster-encoders use random initialized word embeddings for sentiment classification, and use Glove embeddings as initialization for intent classification, which is likely because the training sets of the intent tasks are usually small. Since all the sentiment classification tasks are binary classification based on our dataset construction. A CNN classifier with binary output layer can be also trained as the cluster-encoder for each task cluster. Therefore we compared CNN classifier, matching network, and prototypical network on Amazon review, and found that CNN classifier performs similarly well as prototypical network. Since some of the Amazon review data is quite large which involves further difficulty on the computation of supporting sets, we finally use binary CNN classifiers as cluster-encoders in all the sentiment classification experiments. Selection of the learning rate and number of training epochs for FSL settings, i.e., fitting $\alpha$s in Eq. (\ref{eqn:fsl}), is more difficult since there is no validation data in few-shot problems. Thus we pre-select a subset of meta-training tasks as meta-validation tasks and tune the two hyper-parameters on the meta-validation tasks. \subsection{Experimental Results} \label{ssec:exp_main} Table \ref{tab:main_exp} shows the main results on (i) the 12 few-shot product sentiment classification tasks by leveraging the learned knowledge from the 57 previously observed tasks from other product domains; and (ii) the 10 few-shot dialog intent classification tasks by leveraging the 165 previously observed tasks from other clients' data. Due to the limited training resources, all the supervised-learning baselines perform poorly. The two state-of-the-art metric-based FSL approaches, matching network (4) and prototypical network (5), do not perform better compared to the other baselines, since the single metric is not sufficient for all the diverse tasks. On intent classification where tasks are further diverse, all the single-metric or single-model methods (3-5) perform worse compared to the single-task CNN baseline (1). The convex combination of all the single training task models is the best performing baseline overall. However, on intent classification it only performs on par with the single-task CNN (1), which does not use any meta-learning or transfer learning techniques, mainly for two reasons: (i) with the growth of the number of meta-training tasks, the model parameters grow linearly, making the number of parameters (165 in this case) in Eq.(\ref{eqn:fsl}) too large for the few-shot tasks to fit; (ii) the meta-training tasks in intent classification usually contain less training data, making the single-task encoders not generalize well. In contrast, our \textsc{RobustTC}-FSL gives consistently better results compared to all the baselines. It outperforms the baselines in previous work (1-5) by a large margin of more than 6\% on the sentiment classification tasks, and more than 3\% on the intent classification tasks. It is also significantly better than our proposed baseline (6), showing the advantages of the usage of task clustering. \paragraph{Adaptive \textsc{RobustTC}-FSL} Although the \textsc{RobustTC}-FSL improves over baselines on intent classification, the margin is smaller compared to that on sentiment classification, because the intent classification tasks are more diverse in nature. This is also demonstrated by the training accuracy on the target tasks, where several tasks fail to find any cluster that could provide a metric that suits their training examples. To deal with this problem, we propose an improved algorithm to automatically discover whether a target task belongs to none of the task-clusters. If the task doesn't belong to any of the clusters, it cannot benefit from any previous knowledge thus falls back to single-task CNN. The target task is treated as ``out-of-clusters'' when none of the clusters could achieve higher than 20\% accuracy (selected on meta-validation tasks) on its training data. We call this method \textbf{Adaptive \textsc{RobustTC}-FSL}, which gives more than 5\% performance boost over the best \textsc{RobustTC}-FSL result on intent classification. Note that the adaptive approach makes no difference on the sentiment tasks, because they are more closely related so re-using cluster-encoders always achieves better results compared to single-task CNNs. \subsection{Analysis} \paragraph{Effect of the number of clusters} Figure \ref{fig:exp_cluster} shows the effect of cluster numbers on the two tasks. \textsc{RobustTC}\ achieves best performance with 5 clusters on sentiment analysis (SA) and 20 clusters on intent classification (Intent). All clustering results significantly outperform the single-metric baselines (\#cluster=1 in the figure). \begin{figure}[t] \centering \includegraphics[scale=0.36]{figures/3.png} \caption{Effect of clusters. \textsc{RobustTC}-SA and \textsc{RobustTC}-Intent: the performance of our \textsc{RobustTC}\ clusters on the sentiment and intent classification tasks. ASAP-MT-LR-SA: the state-of-the-art ASAP-MT-LR clusters on the sentiment-analysis tasks (the method is not applicable to the intent-classification tasks). } \vspace{1.5 em} \label{fig:exp_cluster} \end{figure} \begin{table*}[ht] \centering \tiny \begin{tabular}{c|c|c|c|c|c|c|c|c|c|c} \hline &{\bf Clus0}& {\bf Clus1}& {\bf Clus2}& {\bf Clus3}& {\bf Clus4}& {\bf Clus5}& {\bf Clus6}& {\bf Clus7}& {\bf Clus8}& {\bf Clus9}\\ \hline & automotive.t2& apparel.t2& baby.t5& automotive.t5& apparel.t5& beauty.t4& camera.t4& gourmet.t5& cell.t4& apparel.t4\\ & camera.t2& automotive.t4& magazines.t5& baby.t4& camera.t5& beauty.t5& software.t2& magazines.t4& software.t5& toys.t2\\ & health.t2& baby.t2& sports.t5& health.t4& grocery.t5& cell.t5& software.t4& music.t4& toys.t4& \\ & magazines.t2& cell.t2& toys.t5& health.t5& jewelry.t5& gourmet.t2& & music.t5& & \\ & office.t2& computer.t2& video.t5& & & gourmet.t4& & video.t4& & \\ & outdoor.t2& computer.t4& & & & grocery.t2& & & & \\ & sports.t2& computer.t5& & & & grocery.t4& & & & \\ & sports.t4& jewelry.t4& & & & office.t4& & & & \\ & & music.t2& & & & outdoor.t4& & & & \\ & & video.t2& & & & & & & & \\ \hline \bf dvd-t4& 0.4844 & 0.4416 & 0.4625 & \textcolor{blue}{\bf 0.7843} & \textcolor{blue}{\bf 0.7970} & 0.7196 & \textcolor{blue}{\bf 0.8952} & 0.3763 & 0.7155 & 0.6315\\ \bf dvd-t5& 0.0411 & -0.2493 & \textcolor{blue}{\bf 0.5037} & \textcolor{blue}{\bf 0.3567} & 0.1686 & -0.0355 & \textcolor{blue}{\bf 0.4150} & -0.2603& -0.0867 & 0.0547\\ \bf kitchen-t4& 0.6823 & 0.7268 & 0.7929 & \textcolor{blue}{\bf 1.2660} & \textcolor{blue}{\bf 1.1119} & 0.7255 & \textcolor{blue}{\bf 1.2196} & 0.7065 & 0.6625 & 1.0945\\ \hline \end{tabular} \caption{Visualization of clusters on the Amazon review domain. The top shows the training tasks assigned to the 10 clusters. Here the number N$\in\{2,4,5\}$ refers to the threshold of stars for positive reviews. At the bottom we show three tasks with largest improvement from \textsc{RobustTC}-FSL. The top-3 most relevant task clusters (i.e. with highest weights $\alpha$s in Eq.\ref{eqn:fsl} ) are highlighted with \textcolor{blue}{\bf blue bold} font.}\label{tab:cluseter_visual} \vspace{-0.1in} \end{table*} \paragraph{Effect of the clustering algorithms} Compared to previous task clustering algorithms, our \textsc{RobustTC}\ is the only one that can cluster tasks with varying numbers of class labels (e.g. in intent classification tasks). Moreover, we show that even in the setting of all binary classifications tasks (e.g. the sentiment-analysis tasks) that previous task clustering research work on, our \textsc{RobustTC}\ is still slightly better for the diverse FSL problems. Figure \ref{fig:exp_cluster} compares with a state-of-the-art logistic regression based task clustering method (\textbf{ASAP-MT-LR})~\citep{barzilai2015convex}. Our \textsc{RobustTC}\ clusters give slightly better FSL performance (e.g. 83.12 vs. 82.65 when \#cluster=5). \paragraph{Visualization of Task Clusters} The top rows of Table \ref{tab:cluseter_visual} shows the ten clusters used to generate the sentiment classification results in Figure \ref{fig:exp_cluster}. From the results, we can see that tasks with same thresholds are usually grouped together; and tasks in similar domains also tend to appear in the same clusters, even the thresholds are slightly different (e.g. t2 vs t4 and t4 vs t5). The bottom of the table shows the weights $\alpha$s in Eq.(\ref{eqn:fsl}) for the target tasks with the largest improvement. It confirms that our \textsc{RobustTC}-FSL algorithm accurately adapts multiple metrics for the target tasks. \section{Related Work} \label{sec:related} {\noindent \bf Few Shot Learning} \quad FSL~\citep{miller2000learning,li2006one,lake2015human} aims to learn classifiers for new classes with only a few training examples per class. Recent deep learning based FSL approaches mainly fall into two categories: (1) \emph{metric-based approaches} \cite{koch2015siamese,vinyals2016matching,snell2017prototypical}, which aims to learn generalizable metrics and corresponding matching functions from multiple training tasks. These approaches essentially learn one metric for all tasks, which is sub-optimal when the tasks are diverse. (2) \emph{optimization-based approaches}~\cite{ravi2017optimization,munkhdalai2017meta,finn2017model}, which aims to learn to optimize model parameters (by either predicting the parameter updates or directly predicting the model parameters) given the gradients computed from few-shot examples. Previous FSL research usually adopts the $k$-shot, $N$-way setting, where all the few-shot tasks have the same number of $N$ class labels, and each label has $k$ training instances. Moreover, these few-shot tasks are usually constructed by sampling from one huge dataset, thus all the tasks are guaranteed to be related to each other. However, in real-world applications, the few-shot learning tasks could be diverse: there are different tasks with varying number of class labels and they are not guaranteed to be related to each other. As a result, a single meta-model or metric-model is usually not sufficient to handle all the few-shot tasks. {\noindent \bf Task Clustering} \quad Previous task clustering methods measure the task relationships in terms of similarities among single-task model parameters~\citep{kumar2012learning,kang2011learning}; or jointly assign task clusters and train model parameters for each cluster to minimize the overall training loss \citep{crammer2012learning,barzilai2015convex,murugesan2017co}. These methods usually work on convex models but do not fit the deep networks, mainly because of (i) the parameters of deep networks are very high-dimensional and their similarities are not necessarily related to the functional similarities; and (ii) deep networks have flexible representation power so they may overfit to arbitrary cluster assignment if we consider training loss alone. Moreover, these methods require identical class label sets across different tasks, which does not hold in most of the realistic settings. \section{Conclusion} We propose a few-shot learning approach for diverse tasks based on task clustering. The proposed method can use multiple metrics, and performs significantly better compared to previous single-metric methods when the few-shot tasks come from diverse domains. Future work includes applying the task-clustering idea to other FSL algorithms \cite{ravi2017optimization,finn2017model,cheng2017metametric}, and exploring more advanced composition methods of cluster-encoders beyond linear combination~\cite{chang2013multimedia,andreas2016neural}.
{ "redpajama_set_name": "RedPajamaArXiv" }
6,834
Maria Luisa Ambrosini is a non-fiction author. Her work appears in Harpers. She is secretary at Bocconi University. Works (reprint Barnes & Noble Publishing, 1996, ) References Italian non-fiction writers Living people Year of birth missing (living people) Italian women writers
{ "redpajama_set_name": "RedPajamaWikipedia" }
3,355
Is the Statue of Unity being made in China as claimed by Rahul Gandhi Published: 3, October, 2018 09:28:06 AM; Updated: 3, October, 2018 09:28:06 AM Olivia Brief Outline: Narendra Modi Ji is making Sardar Patel's statue in Gujarat. It will be world's tallest statue but it will be 'Made In China' like our shoes and shirts: Congress President Rahul Gandhi in Chitrakoot. Narendra Modi Ji is making Sardar Patel's statue in Gujarat. It will be world's tallest statue but it will be 'Made In China' like our shoes and shirts: Congress President Rahul Gandhi in Chitrakoot. #MadhyaPradesh Narendra Modi Ji is making Sardar Patel's statue in Gujarat. It will be world's tallest statue but it will be 'Made In China' like our shoes and shirts: Congress President Rahul Gandhi in Chitrakoot. #MadhyaPradesh pic.twitter.com/VMxf0eTr28 — ANI (@ANI) September 27, 2018 Facts Check Analysis: Construction of Statue of Unity is a State Government of Gujarat's project being implemented by Sardar Sarovar Narmada Nigam Ltd. (SSNNL), a wholly owned Government of Gujarat Undertaking. As per the information received from SSNNL, the total amount likely to be spent on the project is Rs. 3060.88 crore. Out of this Rs. 2332 crore is towards construction of the statue and Rs. 657 crore is towards Operation and Maintenance (O&M) for 15 years after completion of the project. Both these activities have been awarded to Larsen and Toubro (L&T) which is an Indian construction company. Rs. 55.63 crore is likely to be spent towards Project Management Consultancy which has been awarded to a consortium of foreign companies. Further, Rs.16.25 crore is likely to be spent towards Proof Consultancy which has been given to joint venture of Tata Egis Ltd. This is a project of Government of Gujarat. The Central Government has not made any commitment regarding its contribution to the cost of the project. However, till date a sum of Rs. 300 crores has been provided to SSNNL for this project. As informed by SSNNL, the tender for Engineering Procurement and Construction (EPC) contract was invited by SSNNL on 2.8.2013 before the launch of Make in India Campaign. The work order of the Statue of Unity was given on 21.10.2014 and Government of Gujarat proposes to undertake the work as per the provisions of the contract agreement. This information was given by Minister of State for Culture and Tourism (Independent Charge) Dr. Mahesh Sharma in a written reply in Rajya Sabha today. As per times of India article titled Sardar's statue being built in India, not China: L&T | India News, published on Oct 22, 2015. "The entire statue itself is being built in India at the site and only the bronze cladding in the form of bronze plates is being sourced from China, which constitutes a negligible amount of less than 9% of the total value of project," L&T said in an official statement. According to L&T, the plates are put together and erected on the core of reinforced concrete and structural steel at the Sadhu Hill site after assembly and welding. So it is true that some percent of the statue parts from being brought from china, but claiming it to be made in china would not be correct. Source: http://pib.nic.in/newsite/PrintRelease.aspx?relid=154638 Tags Sardar Patel\'sGujaratNarendra Modi
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
5,953
E-mail alerts (send us your e-mail and we will contact you with upcoming specials). We invite golfers of all skill levels and ages to enjoy our golf course with affordable rates. Come visit us at Deer Creek.
{ "redpajama_set_name": "RedPajamaC4" }
8,060
Q: Insert data from pyspark dataframe to another cassandra table using pyspark I have a cassandra table - test: +----+---------+---------+ | id | country | counter | +====+=========+=========+ | A | RU | 1 | +----+---------+---------+ | B | EN | 2 | +----+---------+---------+ | C | IQ | 1 | +----+---------+---------+ | D | RU | 3 | +----+---------+---------+ Also I have a table main in the same space with column "country_main" and "main_id". In column main_id I have same ids as in test table, and also I have some unique ids. country_main has empty values and the same as in test. For ex: +---------+--------------+---------+ | main_id | country_main | ...| +=========+==============+=========+ | A | | ...| +---------+--------------+---------+ | B | EN | ...| +---------+--------------+---------+ | Y | IQ | ...| +---------+--------------+---------+ | Z | RU | ...| +---------+--------------+---------+ How to insert data from test table to main using pyspark to fill empty values in country_main according to ids? A: Having following schema & data: create table test.ct1 ( id text primary key, country text, cnt int); insert into test.ct1(id, country, cnt) values('A', 'RU', 1); insert into test.ct1(id, country, cnt) values('B', 'EN', 2); insert into test.ct1(id, country, cnt) values('C', 'IQ', 1); insert into test.ct1(id, country, cnt) values('D', 'RU', 3); create table test.ct2 ( main_id text primary key, country_main text, cnt int); insert into test.ct2(main_id, cnt) values('A', 1); insert into test.ct2(main_id, country_main, cnt) values('B', 'EN', 2); insert into test.ct2(main_id, country_main, cnt) values('C', 'IQ', 1); insert into test.ct2(main_id, country_main, cnt) values('D', 'RU', 3); It should be something like this: from pyspark.sql.functions import * ct1 = spark.read.format("org.apache.spark.sql.cassandra")\ .option("table", "ct1").option("keyspace", "test").load() ct2 = spark.read.format("org.apache.spark.sql.cassandra")\ .option("table", "ct2").option("keyspace", "test").load()\ .where(col("country_main").isNull()) res = ct1.join(ct2, ct1.id == ct2.main_id).select(col("main_id"), col("country").alias("country_main")) res.write.format("org.apache.spark.sql.cassandra")\ .option("table", "ct2").option("keyspace", "test")\ .mode("append").save() What code does: * *selects all rows from ct2 (corresponds to your main table) where country_main is null; *performs join with ct1 (corresponds to your test table) to get value of country from it (optimization could be to select only necessary columns from both tables). Also, please note that join is done by Spark, not on Cassandra level - Cassandra-level joins will be supported only in upcoming version of Spark Cassandra Connector (3.0, but alpha versions already published); *renames columns to match structure of ct2 table; *write data back. Result: cqlsh> select * from test.ct2; main_id | cnt | country_main ---------+-----+-------------- C | 1 | IQ B | 2 | EN A | 1 | RU D | 3 | RU for source data: cqlsh> select * from test.ct2; main_id | cnt | country_main ---------+-----+-------------- C | 1 | IQ B | 2 | EN A | 1 | null D | 3 | RU
{ "redpajama_set_name": "RedPajamaStackExchange" }
2,611
"Bank Row" buildings represent two eras of 20th-century economic expansion. Landmarks voted to designate two bank buildings in Brooklyn as individual City landmarks at its meeting on January 24, 2017. The elder of the two landmarks, the People's Trust Company Building, stands at 181 Montague Street, and the second item, the National Title Guaranty Building, adjoins it at 185 Montague Street. The buildings are the only unprotected historic structures on what is known as "Bank Row," as the north side of the street falls within the Borough Hall Skyscraper Historic District. The People's Trust Company Building, designed by the firm Mowbray & Uffinger, dates to 1904. Classical Revival in style, the building is fronted by four massive Ionic columns, each carved from a single block of marble, reported to be the largest ever quarried at the time the bank was built. Above the columns is an intricately carved pediment. An original frieze has been lost or covered. The People's Trust building was one of the first banks to be constructed in the development of Bank Row. The building is now occupies by a Citibank. The National Title Guaranty Company Building was designed by an early firm specializing in skyscrapers, Corbett, Harrison and MacMurray, with an Art Deco limestone screen at the lower levels designed by Rene Chambellan. The building rises to 16 stories, with setbacks flanking the central bay above the 13th floor. Projecting piers emphasize the tower's verticality, rising from stepped buttresses at the base. Chambellan also designed the decorative elements of other individual landmarks, including the Daily New Building and Rockefeller Center. At a November 29th, 2016, hearing, designation of both buildings was supported by Council Member Stephen Levin, local and citywide preservationist organizations, and area residents. The owners of National Title Guaranty Building, the Montague-Goldman Corporation, opposed designation, saying landmarking would prevent redevelopment, and hamper bringing the building into code compliance. Both structures were designated unanimously. Chair Meenakshi Srinivasan said the designation would ensure the protection of significant architecture in the history of Brooklyn's financial industry. LPC: People's Trust Company Building, 181 Montague Street, Brooklyn (LP-2586); National Title Guaranty Company Building, 185 Montague Street, Brooklyn (LP-2587) (Jan. 24, 2017).
{ "redpajama_set_name": "RedPajamaC4" }
349
Het Reisgenootschap van de Ring (Engels: The Fellowship of the Ring) is een gezelschap uit het befaamde boek In de ban van de ring (The Lord of the Rings) van J.R.R. Tolkien, bestaande uit negen vertegenwoordigers van uit de vrije volkeren van Midden-aarde. Het reisgenootschap wordt gevormd op 25 december van het jaar 3018 van de Derde Era tijdens de Raad van Elrond in Rivendel. Het aantal van negen werd gekozen om ten strijde te trekken tegenover de negen Ringgeesten van Sauron. Het reisgenootschap is de immense taak toevertrouwd om Frodo te assisteren en te beschermen tijdens zijn queeste naar Mordor om de Ene Ring te vernietigen in het hart van de Doemberg. Leden Dwergen: Gimli Elfen: Legolas Hobbits: Frodo Merijn Pepijn Sam Mensen: Aragorn Boromir Maiar/Istari: Gandalf Personage in werk van Tolkien
{ "redpajama_set_name": "RedPajamaWikipedia" }
2,760
A new study suggests if your parents lived past 70 years of age, you are 20 percent less likely to die from heart disease. You may also have lower rates of vascular disease, heart failure, stroke, high cholesterol and high blood pressure. The study's co-author is Luke Pilling, a research fellow in epidemiology and public health at the University of Exeter Medical School. We aimed to find the factors that influence the health and lifespan of offspring — the ones that are transferred from their parents. The researchers studied over 186,000 subjects, aged 55 to 73, all of whose parents had died. The participants were recruited between 2006 and 2010, and about 4,700 of the died over the course of the eight-year study. The correlation between longer-living parents and heart health remained constant even after adjustments for education, age, weight and physical activity level. The researchers mentioned in their conclusions that other studies have found similar results, but those involved smaller groups of participants. Though people with longer-lived parents are more likely to live longer themselves, there are lots of ways for those with shorter-lived parents to improve their health. People can really take their health into their own hands. These are all factors that affect risk of heart disease. We did find some clues that there might also be other pathways to longer life, such as through better repair of damage to DNA. The scientists recommend more research to increase understanding of these factors.
{ "redpajama_set_name": "RedPajamaC4" }
5,202
Usisha () is a rural locality (a selo) and the administrative centre of Usishinsky Selsoviet, Akushinsky District, Republic of Dagestan, Russia. The population was 3,932 as of 2010. There are 12 streets. Geography Usisha is located 8 km southeast of Akusha (the district's administrative centre) by road. Aynikabmakhi is the nearest rural locality. References Rural localities in Akushinsky District
{ "redpajama_set_name": "RedPajamaWikipedia" }
4,382
{"url":"https:\/\/solvedlib.com\/the-range-of-x-in-the-following-expression-is,15666","text":"# The range of X in the following expression is . abs(abs(x+1)+1)>=1 ?\n\n###### Question:\n\nThe range of X in the following expression is . abs(abs(x+1)+1)>=1 ?\n\n#### Similar Solved Questions\n\n##### 30Mainly HHIs+ ~A6uau3 A4lr F2p 420 Mainly F 2 F2s\n30 Mainly H HIs + ~A6uau3 A4lr F2p 420 Mainly F 2 F2s...\n##### Tonty du09 Oulr slret0 @Cluhoma 050\/2 pointsPtcou: AnswertSerpse10 J0,1,0p.011.C ofeJha quro bulot CeLe Jedius Eaud crna OncTeachetohe nalcrtut Frn IL_Mlonu Gunten cendcoenam Jone-rLL-Uojio-the Lalenaldhat HiTatnathEaneHetntn tofmagnutic fialdalertald \"chroughaFonaerieniEnncntdecteneaa amNegd Holp?FrcntVicnTypesercnJSUS\nTonty du 09 Oulr slret 0 @ Cluhoma 05 0\/2 points Ptcou: Answert Serpse10 J0,1,0p.011. C ofe Jha quro bulot CeLe Jedius Eaud crna Onc Teachet ohe nalcrtut Frn IL_ Mlonu Gunten cendcoenam Jone-r LL-Uojio- the Lalenald hat Hi Tatnath Eane Hetntn tof magnutic fiald alertald \" chrough a Fonaerieni E...\n##### Find the exact area bounded by the curve y=cos 3x, the x-axis and the line x=0 and x=\u03c0\/12?\nthanks soo much...\n##### Webass q neu\"u DETAILSSCALCET8 5.5.057.12. [~\/1.42 Points]Evaluate tne definite integral; sinlt) cos (t)Tellen IuaNeed Help?Anbdl[-\/1.42 Points]DETAILSSCALCET8 063,Rvtluae the Cefinite integ A24 2Need Help?He1d \/(Valch IqHTallc[-\/1.54 Points]DETAILSSCALCETB067_Fvtatedefinite integral.'r = 5Need Help?Dja IlErnchileTalk to @ lularSubmit Assignment Save Assignment Progres\nWebass q neu\"u DETAILS SCALCET8 5.5.057. 12. [~\/1.42 Points] Evaluate tne definite integral; sinlt) cos (t) Tellen Iua Need Help? Anbdl [-\/1.42 Points] DETAILS SCALCET8 063, Rvtluae the Cefinite integ A 24 2 Need Help? He1d \/( Valch Iq HTallc [-\/1.54 Points] DETAILS SCALCETB 067_ Fvtate defini...\n##### A rectangular coil with a length of 9.0 cm and a width of 4.0 cm and...\nA rectangular coil with a length of 9.0 cm and a width of 4.0 cm and 250 turns is placed in a uniform magnetic field with a magnitude of 0.92 T. (a) If the maximum torque experienced by the coil is 0.16 N \u00b7 m, determine the current in the coil. mA (b) When the magnetic field makes an angle o...\n##### Question 9How much should you invest each month in order to have S700,000 if your rate of return is 3.58 compounded monthly and you want to achieve your goal in 40 years?How much interest will you earn?How much should you invest each month in order to years? havc 5700,000 if you want to achieve your goal in 20You Jeposit thc amount after 10 ycar;? you need t0 achleve your goal In 20 ycars, how much will your saving? be worthQucaLlo\nQuestion 9 How much should you invest each month in order to have S700,000 if your rate of return is 3.58 compounded monthly and you want to achieve your goal in 40 years? How much interest will you earn? How much should you invest each month in order to years? havc 5700,000 if you want to achieve y...\n##### What is pathetic fallacy used for and what effect it could have?\nWhat is pathetic fallacy used for and what effect it could have?...\n##### Dr +y Solve the 21; given initial-value problem: Dv =I ~(1) = 0; v(l) = 1\nDr +y Solve the 21; given initial-value problem: Dv =I ~(1) = 0; v(l) = 1...\n##### Graphing Factored Polynomials Sketch the graph of the polynomial function. Make sure your graph shows all intercepts and exhibits the proper end behavior.$P(x)= rac{1}{12}(x+2)^{2}(x-3)^{2}$\nGraphing Factored Polynomials Sketch the graph of the polynomial function. Make sure your graph shows all intercepts and exhibits the proper end behavior. $P(x)=\\frac{1}{12}(x+2)^{2}(x-3)^{2}$...\n##### Let A and B be subsets of S. Prove the following: 1. The compliment of A...\nLet A and B be subsets of S. Prove the following: 1. The compliment of A is a subset of B iff A union B = S 2. A is a subset of the compliment of B iff B is a subset of the compliment of A...\n##### Scientists are developing test for new virus that is based on measuring person's antibody levels. The test produces a score that provides information on whether the person is infected with the virus: For any given person; the score is normally distributed with mean 64 and variance 361. Assume that the test scores are independent from person to person: Any person with a test score over 76 is considered confirmed case of the virus. In random sample of 12 people, each person was given the anti\nScientists are developing test for new virus that is based on measuring person's antibody levels. The test produces a score that provides information on whether the person is infected with the virus: For any given person; the score is normally distributed with mean 64 and variance 361. Assume t...\n##### () Given +hat @fad 6(,2)= 28-33 +hat 6(,2) = !0 Estimt 6(1.3,1.6) Gnd e %vation of th Plane +ange+ Final +he 6-Xy-Y 2 atthe Point (2,1,2 ) +-0 the Surfoce %*=\n() Given +hat @fad 6(,2)= 28-33 +hat 6(,2) = !0 Estimt 6(1.3,1.6) Gnd e %vation of th Plane +ange+ Final +he 6-Xy-Y 2 atthe Point (2,1,2 ) +-0 the Surfoce %*=...\n##### Determine if a relation is a function given set of ordered pairs or a mapping QuestionUse the mapping to determine whether the relation is a function.NamePhone Number(321)503-3123 cell (545)253-2125 homeHerbMikeJenny(718)453-3153 cellMia(570)153-3333 cellKrystal(123)447-2653 home (443)753-3771 cell (493)153-2190 cellMargaritaSelect the correct answer below:Yes; the relation is a functionNo, the relation is not a function\nDetermine if a relation is a function given set of ordered pairs or a mapping Question Use the mapping to determine whether the relation is a function. Name Phone Number (321)503-3123 cell (545)253-2125 home Herb Mike Jenny (718)453-3153 cell Mia (570)153-3333 cell Krystal (123)447-2653 home (443)75...\n##### Evaluate[[(4y_ +6xy+lZx+l)dA where D={(x,Y)O<x<20<y<l}\nEvaluate [[(4y_ +6xy+lZx+l)dA where D={(x,Y)O<x<20<y<l}...\n##### 3. During a very quick stop, a car decelerates at 6.2 m\/s2. Assume the forward motion...\n3. During a very quick stop, a car decelerates at 6.2 m\/s2. Assume the forward motion of the car corresponds to a positive direction for the rotation of the tires (and that they do not slip on the pavement). a. What is the angular acceleration of its tires in rad\/s2, assuming they have a radius of 0...\n##### L 9 2 1 vi 0 9 1 2 2 3 2 El~ Ek ~ 8 C 0 1 YL IFL 4( 1 3 3 7 3 1 Vi l 1 1 g (\nl 9 2 1 vi 0 9 1 2 2 3 2 El~ Ek ~ 8 C 0 1 YL IFL 4( 1 3 3 7 3 1 Vi l 1 1 g (...\n##### How do you graph y = -abs(x+10)?\nHow do you graph y = -abs(x+10)?...\n##### Assuming the price index in 2017 was 127 and 136 in 2018, what was the inflation...\nAssuming the price index in 2017 was 127 and 136 in 2018, what was the inflation rate between 2017 and 2018?...\n##### Show all your work please! 200 N Problem 1 (30 points): Consider the bent rod of...\nShow all your work please! 200 N Problem 1 (30 points): Consider the bent rod of 5cm diameter which is in equilibrium under the loads shown. a. Calculate the force and moment 300 N 500 N resultants acting at the center of the cross-section that includes point A, and illustrate them with a sketch. 2...\n##### Page 1 of 4[19 pts]Modeling ExercisesAn envelope contains 9 bills: 6 ten-dollar bills and 3 five-dollar bills. Person A reaches into the envelope and takes out one bill. Person A keeps the extracted bill and then hands the envelope to Person B, who then also extracts one billDefine the variables: X = a Bernoulli random variable such that X = 1 if Person A extracts a S10 bill; 0 otherwiseY = the amount of the bill which Person B extractsDetermine P(X, Y)(ii) Suppose, before the game is played, yo\nPage 1 of 4 [19 pts] Modeling Exercises An envelope contains 9 bills: 6 ten-dollar bills and 3 five-dollar bills. Person A reaches into the envelope and takes out one bill. Person A keeps the extracted bill and then hands the envelope to Person B, who then also extracts one bill Define the variables...\n##### How much fluid would a 19Kg dog receive in 10 hours if the fluid was given...\nHow much fluid would a 19Kg dog receive in 10 hours if the fluid was given at a rate of 40mL\/Kg\/day?...\n##### Three charges are arranged on straight line as shown in figure. What is the direction of the electric force exerted on the upper charge?2 pCPositive X-direction: Negative X-direction Positive Y-direction: Negative Y-direction.3 m2 pCIm2 pC\nThree charges are arranged on straight line as shown in figure. What is the direction of the electric force exerted on the upper charge? 2 pC Positive X-direction: Negative X-direction Positive Y-direction: Negative Y-direction. 3 m 2 pC Im 2 pC...\n##### 2. Olympic Games data below that relates to men\u2019s and women's performances in the 100m and...\n2. Olympic Games data below that relates to men\u2019s and women's performances in the 100m and high jump. a. Check students' understanding of the tables with questions like: \uf0b7 In which years did the men reached 2.23m in the High jump? \uf0b7 In which years did the women reached 1....\n##### Example 2: For the beam shown below, find (a) the deflection at D and (b) the...\nExample 2: For the beam shown below, find (a) the deflection at D and (b) the rotation at C. Assume E = 29,000 ksi and I = 170 in. 8k 10...\n##### For Python | Instructions Write a script named difpy. This script should prompt the user for...\nFor Python | Instructions Write a script named difpy. This script should prompt the user for the names of two text files and compare the contents of the two files to see if they are the same. 1. If they are the script should simply output \"Yes\". 2. If they are not the script should output...\n##### Enthalpy change and states of matter problem\nQ30-what will be the final temperature of the water in an insulated container as the result of passing 5.00g of steam h2o (g)at 100 c into 100 g of water at 25 c ??(deltaHVAP0=40.6KJ\/MOL H20)MY QUESTION IS WHY ENERGY RECEIVED BY WATER IS 11.2+DELTAH???...\n##### Utaaenactos Las chimiaat MuMIOEII cllosen Iromn vety Large Datd hles Lerj he fst no zer0 digit dispropoibonately Orlen Fa [eragc shown Unai ilrou TanJoiniy Orav MumaeerrGn Yeny lroe dald Ie Mabaoiin qetuno numbernith tho Wading Olgit Is about 0t0y Gvopose audior vaty Largo corpcratlcn vonvo (opon Irvclyos mllllcn; of numbons computer Ale LC? LI voutoc\" randomampla 4 n 710 numencal ertrios from tha nlc eres nad Mst ncrzero diait Oi 1 {epiesem popularion picponion 0i Jii nuibers the comporate\nUtaaenactos Las chimiaat MuMIOEII cllosen Iromn vety Large Datd hles Lerj he fst no zer0 digit dispropoibonately Orlen Fa [eragc shown Unai ilrou TanJoiniy Orav MumaeerrGn Yeny lroe dald Ie Mabaoiin qetuno numbernith tho Wading Olgit Is about 0t0y Gvopose audior vaty Largo corpcratlcn vonvo (opon Ir...\n##### When the switch is closed in a series RC circuit with R = 20Ohms and C = 4 uF, the initial current is 0..25 A. What will thefinal charge on the plates of the capacitor be?\nWhen the switch is closed in a series RC circuit with R = 20 Ohms and C = 4 uF, the initial current is 0..25 A. What will the final charge on the plates of the capacitor be?...\n##### 6. Given two mutually excdlusive events 4 and B for which PlA)-027 and P(B) 0.46, find...\n6. Given two mutually excdlusive events 4 and B for which PlA)-027 and P(B) 0.46, find (e) P(An B); (f) P(A'n B); (g) P(A'n B); (h) P(A'uB). (c) P(AuB); (d) P(An B); (Hint: Draw a Venn diagram and fill in the probabilities associated with the various regions.)...\n##### Ex. 169 The Assembly Department uses a process cost accounting system and a weighted average cost...\nEx. 169 The Assembly Department uses a process cost accounting system and a weighted average cost flow assumption. The department adds materials at the beginning of the process and incurs conversion costs uniformly throughout the process. During July, $190,000 of materials costs and$137,100 in conv...\n##### If a = 30 cm, b = 40cm; Q= 2.0 HC, and q = 5.0 HC , what is the potential at point P? (,83x102 Ixi Xiue G40V -2,Quc tsQug (xlun) L 3 xio-& Guum ~ZUmIf a = 25 cm, b = 30 cm; Q = -4,0NC and 9= 1.5 HC what is the magnitude 9f the electric field at point P? Axint 54 Quc)xiU ~G, utWS iSm) =lSx 'Ionk- NCs lexls Itl,SC ab-iasxy: 30 Nlo\nIf a = 30 cm, b = 40cm; Q= 2.0 HC, and q = 5.0 HC , what is the potential at point P? (,83x102 Ixi Xiue G40V -2,Quc tsQug (xlun) L 3 xio-& Guum ~ZUm If a = 25 cm, b = 30 cm; Q = -4,0NC and 9= 1.5 HC what is the magnitude 9f the electric field at point P? Axint 54 Quc)xiU ~G, utWS iSm) =lSx '...\n##### Describe how EHR systems help eResearch.\nDescribe how EHR systems help eResearch....","date":"2023-02-08 06:18:00","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 7, \"mathjax_inline_tex\": 2, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.5095059275627136, \"perplexity\": 6864.879366469418}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2023-06\/segments\/1674764500719.31\/warc\/CC-MAIN-20230208060523-20230208090523-00632.warc.gz\"}"}
null
null
Regeringskansliet är en svensk statlig förvaltningsmyndighet under regeringen. Med införandet av 1974 års regeringsform ersattes det gamla namnet Kunglig Majestäts kansli den 1 januari 1975 med Regeringskansliet. Sedan den 1 januari 1997 är Regeringskansliet, inklusive alla departement, en myndighet. Myndigheten är en politiskt styrd organisation, där regeringen avgör arbetets inriktning och vilka frågor som ska prioriteras. Tjänstemännen i Regeringskansliet, som till största delen är opolitiska, arbetar med att ta fram underlag till regeringens beslut, och utreda olika frågor. Dessutom är en viktig del av verksamheten att driva den fastlagda svenska politiken i olika sammanhang, exempelvis i Europeiska unionen (EU). Årsboken redovisar den verksamhet som genomfördes i Regeringskansliet under året som gick, både i text och statistik. Organisation Regeringskansliets indelning i departement har varierat något över tid och varje regering har möjlighet att ändra indelning. Vissa departement, såsom Justitiedepartementet och Utrikesdepartementet, har funnits länge. Varje departement leds av en departementschef som är statsråd, vanligen kallad minister. Statsministern är myndighetschef och chef för Statsrådsberedningen medan Förvaltningsavdelningen leds av en opolitisk förvaltningschef. Vid sidan av statsministern och departementscheferna finns också andra statsråd. De kallades tidigare för konsultativa statsråd eller minister utan portfölj. I dag har även dessa statsråd egna ansvarsområden och är knutna till ett departement eller till Statsrådsberedningen. Exempel på sådana ministrar som inte är departementschefer är EU-ministern och biståndsministern. Varje statsråd har en politisk stab. Den politiska staben består oftast av en statssekreterare, en pressekreterare och en eller flera politiskt sakkunniga. De hjälper statsrådet i det politiska arbetet. Om statsrådet avgår upphör även anställningen för de politiskt anställda tjänstemännen. Av Regeringskansliets cirka 4 600 anställda är omkring 200 politiskt rekryterade. En stor del av dessa är emellertid placerade vid Statsrådsberedningen där bland annat regeringspartiernas samordningskanslier finns. I de flesta departement är andelen politiskt tillsatta tjänstemän således mycket låg. I Statsrådsberedningen och i varje departement finns enheter för olika sakområden och dessutom funktioner för budget, kommunikation, personalfrågor och rättsliga frågor samt EU- och internationella frågor. Opolitiska chefstjänstemän i ett departement är bland andra rättschefen och expeditionschefen. Departementsråden är chefer för sakenheterna. Medan den politiska ledningen är knuten till ministern är övriga tjänstemän fast anställda och sitter kvar även vid regeringsskiften. Eftersom besluten förbereds av Regeringskansliets tjänstemän är det vanligt att opolitiska tjänstemän i praktiken skriver förslag på till exempel propositionstext, delar av statsbudgeten, eller myndigheters regleringsbrev som sedan regeringen beslutar om. Merparten av arbetet vid departementen kretsar kring lagstiftning och kring statsbudgeten, myndighetsstyrning och EU-arbetet. Departement Från och med den 21 januari 2019 ingår i Regeringskansliet: Statsrådsberedningen (SB) Justitiedepartementet (Ju) Utrikesdepartementet (UD) Försvarsdepartementet (Fö) Socialdepartementet (S) Finansdepartementet (Fi) Utbildningsdepartementet (U) Klimat- och näringslivsdepartementet (KN) Landsbygds- och infrastrukturdepartementet (LI) Kulturdepartementet (Ku) Arbetsmarknadsdepartementet (A) Regeringskansliets förvaltningsavdelning (FA) Ekonomi och personal Regeringskansliet kostar ungefär 8 miljarder kronor årligen och har 4600 anställda. De allra flesta tjänstemän är opolitiska tjänstemän (exempelvis rättssakkunniga, kansliråd, ämnesråd, departementssekreterare). Omkring 200 är politiskt tillsatta (statsråd, statssekreterare, politiskt sakkunniga, pressekreterare). Det gör Regeringskansliet till ett av rikets största utgiftsposter och största arbetsgivare. T.ex. anställer Volvo Lastvagnar bara nästan 1000 fler anställda. Perspektiv I jämförelse med ministerierna i många andra länder är svenska departement små och har relativt begränsade uppgifter. I Sverige sköts merparten av statens uppgifter istället av statliga förvaltningsmyndigheter ledda av generaldirektörer (eller motsvarande). Myndigheterna styrs av regeringen, som också tillsätter myndighetscheferna. I praktiken sorterar varje myndighet under ett specifikt departement och rapporterar till en minister. Särfall: Utrikesdepartementet Utrikesdepartementet skiljer sig från denna organisationsform på det sätt att det organisatoriskt påminner mer om andra länders utrikesministerier, och är därför större än andra svenska departement. De svenska utlandsmyndigheterna (framför allt ambassader) är myndigheter under Utrikesdepartementet. Sida är också en myndighet under Utrikesdepartementet. Elefantkyrkogården Med Regeringskansliets "Elefantkyrkogård" avses placeringar av oönskade offentligt anställda på Regeringskansliet. Det har uppmärksammats att avsatta generaldirektörer med tid kvar på sitt förordnande har placerats där i allt från enstaka månader till mer än fem år. I september 2012 beräknades den årliga kostnaden för lönerna för generaldirektörerna på elefantkyrkogården uppgå till sammanlagt 9,5 miljoner kronor per år, exklusive sociala avgifter och förmåner. 2017 beräknades det att lönekostnaderna för de nio omplacerade generaldirektörer och andra statliga chefer på regeringskansliet uppgick till 17 miljoner kronor per år. Rune Premfors, professor i statsvetenskap vid Stockholms universitet, såg 2012 inget alternativ till modellen. Se även Lagstiftningsprocessen Regeringskansliets rättsdatabaser Kunglig Majestäts kansli Stockholms regeringskvarter Källor Regeringens och Regeringskansliets webbplats Rune Premfors & Göran Sundström: Regeringskansliet, Liber förlag. Referenser
{ "redpajama_set_name": "RedPajamaWikipedia" }
3,668
Research & Academic / Archived RAP Events / International_AllatSea_2012 All at Sea: Piracy and the Trade Routes of Art History March 21–23, 2012 This inaugural event, convened by Kavita Singh, Jawaharlal Nehru University, brought together scholars that specialize in the visual arts and culture of South East Asia. Scholars from the Indian Ocean littoral, South East Asia, Asia, North America, and Oceania met to discuss questions of economic, cultural, and artistic exchange. The discussion foregrounded 'piracy' as a metaphor to think about art history and it generated a range of important themes. This event was in partnership with the Power Institute at the University of Sydney and made possible by the Andrew W. Mellon Foundation's grant to the Clark. Session topics included: 'Piracy' as a metaphor for modernity, exchange, and art history Global art markets and global art history 'Temporality' and other critical concepts, such as 'locality' and 'materiality,' as new entry points into historical and contemporary narratives of art Issues of comparative historiography Historical formations of the region and their impact on cultural traditions and changing art practices The validity of different forms of art historical knowledge Conceptions of 'the nation' and colonial/postcolonial experiences Contemporary art and its references to 'transition', 'movement,' and 'trade' as a pre-modern, and modern issue also The antagonism of language(s) In order of discussion Kavita Singh, Mark Ledbury, Michael Ann Holly Session 1: "Begging, Borrowing, Stealing" Session lead-ins: Sarat Mahara, Aamir Mufti On the ways in which we take ownership of the discipline: by begging, by borrowing, or by stealing. This session asks us to consider the terms on which art histories written in/for the Indian Ocean are 'owned' by these locations. Does the metaphor of 'piracy' help recalibrate the relation between Euro-American centers and Asian 'peripheries'? Can non-Euro-American narratives compete against those already in place? Do they need to? Session 2: "The Tilt of the World" Session lead-in: Gao Shiming As Asian economies prosper, they become new markets for industrial products and luxury goods. They also become new centers in the global art world, with museums, biennials, fairs, and art markets emerging in new places. Different centres – Japan, Korea, Singapore, and China at different times- have staked a claim for Asian cultural leadership. As new institutions emerge in new centers, does the art world change? Or does art history do the same thing everywhere, and does art history promote capitalist values? Is art history guilty about this, overcompensating by looking for heroic, anti authoritarian artists, only to end up lionizing some of capitalism's most successful entrepreneurs as heroic figures of critical resistance? Will the major art history surveys/textbooks be published and distributed differently? Will museum economies change? Will there be an "October" in Singapore? Session 3: "Temporalities" Session lead-ins: Keith Moxey, Shelly Errington, Chaitanya Sambrani Art history is narrative. Does the temporal structure of narrative privilege chronology? If so, isn't chronology too deeply identified with the triumphalist teleological narrative of Western culture? Are there other literary forms that might be used to challenge the status quo? Session 4: "Latitudes" Session lead-ins: Patrick Flores, Gao Shiming How is geography to be construed? Places can be connected to each other for many reasons and in many ways: by proximity, by shared histories, by joint economies, by sympathetic ideas and ideologies. Thus, Mumbai might be 'closer' to London than Karachi; or Manila-Bangkok-Jakarta may be an archipelago within which artists have moved. This panel asks participants to think about the lateral migration of ideas, artists, and ideas about art within locales, as well as ways to construe locality. Thus, for instance, is "region" to be understood in the colonial or political sense or in a more geographical sense that will include Hong Kong, Taiwan, Macau, some parts of China and India, and so on? Session 5: "Other Colonialisms" Session lead-ins: Frederick Asher, Aamir Mufti Looking at Asian art histories from a vantage point in the west, one is impelled to ask questions about the West's hegemony over the rest. But art historical 'colonialism' doesn't only originate in the West: From a vantage point within Asia, one may ask: what about the narratives imposed on the region by India and China? The hegemony of their art histories over the art of Southeast Asia is almost complete: visual imagery produced in Southeast Asia – imagery both past and contemporary – is always seen as linked to somewhere else. Can we overcome this? How and to what end? Day 1 Final Thoughts Session 6: "Can There Be a 'Poor Art History'?" Session lead-ins: Jill Bennett, Chaitanya Sambrani Borrowing from Grotowski's formulation of a 'poor theatre' that eschewed expensive costumes and sets, in favor of an intense engagement between actor and audience, we ask: is art history – which requires access to internationally dispersed collections of objects of high monetary worth, image banks, libraries, illustrated publications, etc – a luxury commodity? Can art history be produced in conditions of poverty and institutional lack? Or is it the case that 'source countries' for artifacts can be poor, but the centres for the production of art history must be rich? Can we imagine what a 'poor art history' (written from the ground in Cambodia, Vietnam, and Myanmar for example) would be? Session 7: "Everywhere, the Nation" Session lead-ins: Frederick Asher, Shelly Errington Despite the real changes wrought by globalization, we do not live in a 'post-national' world. The nation-state exerts a strong influence on the art world and on the shape of art history, through ideology, official policies, legal frameworks and other forms of governance. How is 'the nation' experienced by art historians across Asia, and how is their field of operation defined by it? Session 8: "Is the Contemporary Art World Flat?" Session lead-ins: Patrick Flores, Jill Bennett, Shigemi Inaga When art history addresses pre-modern arts of Asia, it looks for local meanings – via traditions, texts and contexts that are tied to place of origin. Post modern art is seen as naturally belonging/legible to a globalised art world, produced by and for a nomadic transnational art sphere. Is the art history that is written for contemporary art no longer tied to locality? Session 9: "The Voice of Art History" Session lead-ins: Shelly Errington, Sarat Maharaj What language does art history speak? English? French? German? What art histories have been written in Asian languages? If Asian-language art history follows a different trajectory from the art history written in European languages, who is speaking it and who is listening to it? What are art history's voices and patterns of hearing? What role can translation play? On the other hand, has art history's voice been taken away by other, neighbouring disciplines – anthropology, history, literature, cultural studies? In the case of India, the most compelling work on visual studies is emerging from these disciplines rather than art history. "Charting Course": Planning for 2013 and 2014 Public Symposium, "All at Sea" Participants included Frederick M. Asher, University of Minnesota Jill Bennett, University of New South Wales John Clark, Australian National University Shelley Errington, University of California, Santa Cruz Patrick D. Flores, University of the Philippines-Diliman Shigemi Inaga, International Research Center for Japanese Studies Mark Ledbury, Director of the Power Institute at the University of Sydney Aamir Mufti, University of California, Los Angeles Chaitanya Sambrani, Australian National University Kavita Singh, School of the Arts and Aesthetics, Jawaharlal Nehru University
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
3,338
Just days after President Donald Trump's inauguration, activists from Greenpeace climbed up a large construction crane near the White House and unfurled a large banner with the single word: Resist. On Feb. 11, thousands of protesters used their bodies to spell the word "resist" on a San Francisco beach. The next day, at the Grammys, rapper Q-Tip yelled "resist" no less than four times from the stage. All of these examples speak to a widespread and resolute discontent with the election of President Trump. They express a rejection of his agenda and of what they see as his degradation of our democracy. "Resist" reflects their desire, insofar as they can, to stop this from happening. But what exactly does it mean to resist? And most importantly, how can Americans make sure that their resistance is most likely to effect change? I have studied the words and actions of Martin Luther King for decades. King led one of the most successful, nonviolent resistance movements in American history. I believe his example is especially germane to these questions. What can today's resisters learn from King and the civil rights movement? The word, "conservative" has a specific meaning here. King was a democratic socialist, he opposed the Vietnam War and he called for massive investment in the inner cities. He was not conservative in any political sense. But what Meier showed was that King nevertheless manifested a conservative core – one that resonated with millions of Americans and thereby helped achieve the movement's remarkable success. King's resistance was also strictly nonviolent. Following the model of civil resistance developed by M.K. Gandhi, leader of Indian independence, King argued for nonviolence within the terms of his own Christian faith. But King also insisted that nonviolent resistance spoke to a respect for the law that can only be called conservative. In his Letter from Birmingham Jail, where he was imprisoned in 1963, King insisted that while unjust laws must be broken, they must be broken "lovingly," such that the act demonstrates a respect, even a reverence, for the law. Conducting the struggle "on the high plane of dignity and discipline," dressing well, using respectful language and accepting violence without responding in kind: All this gave protesters a moral standing that attracted moderates to the cause. It also sought to change the hearts and minds of the bigots, but even if that effort failed, the bigots were nevertheless defeated. The notion of conservative militancy likely does not, however, resonate with today's resisters. For many of them, this moment is an opportunity to grow and strengthen the left either within or outside the Democratic Party; for some, it is an opportunity to move beyond the two-party system altogether. But within the civil rights movement, similar designs were often met with the operating principle: Keep your "eyes on the prize." What it meant was that individuals should not allow themselves to be distracted. Rather, they should continually orient themselves and their actions such that they advance the movement toward the ultimate goal. Right now, many Americans contend that longstanding democratic procedures, norms and ideals are under attack. Because they seek to defend those core American ideals, those who resist have become, by default, conservatives and patriots. Contemporary resisters would therefore do well to remember King's example. By accepting their own role as "militant conservatives" and accommodating their actions accordingly, they are more likely to resist effectively, and thereby achieve the ends they seek.
{ "redpajama_set_name": "RedPajamaC4" }
1,347
China has made significant progress along the path of liberalizing its economy and financial markets, but at least two large impediments remain: capital restrictions and state ownership. Since China does not fully allow the free flow of capital into (or out of) mainland China, Chinese companies have been forced to navigate a variety of trade-offs in determining where they should legally incorporate and where they should publicly list their equity. As a result, Chinese companies currently trade in five different currencies, on seven different exchanges, representing seven different share classes (shown below). Additionally, since the Chinese government may be a significant shareholder of certain businesses, a large portion of a company's stock may not be eligible for trading. Due to these complexities, Chinese equities currently only account for approximately 3% of global equity benchmarks, despite their companies making up 15% of global equity market capitalization. 1 This will not always be the case, and one catalyst to narrowing the underinvestment is today's inclusion of A-shares into the MSCI Emerging Markets Index. The market impact may be negligible over the coming weeks and months, but it is symbolic of a broader trend toward Chinese financial market inclusion and will heighten institutional investor attention on accessing this increasingly important market. While some companies chose to list multiple share classes in different jurisdictions, companies listed in Shanghai and Shenzhen (A-shares) faced extremely limited access for international investors. After a series of capital market pilot programs and reforms, MSCI confirmed May 14 that it would be including 234 Chinese listed companies in the MSCI Emerging Markets Index. After a two-step process in June and September is completed, approximately .8% of the MSCI Emerging Markets Index will be Chinese A-shares. To limit market impact in the short run, MSCI sought to limit the number of holdings that were eligible and also cap their weights via a 5% inclusion factor. However, as we show below, should those 234 securities one day be eligible for full inclusion, Chinese A-shares would account for over 17% of the MSCI Emerging Markets Index. While the timing of full MSCI inclusion remains uncertain, we believe that it could occur over the next five years. In fact, we do not believe it is a coincidence that Chinese policy makers announced a 4x increase 2 of the daily mainland stock quotas to take effect May 1 in order to facilitate these changes to emerging markets benchmarks. WisdomTree believes that with China likely accelerating market reforms, the concept of how beta is defined will likely undergo a dramatic shift. In our view, investors should seek exposure via the broadest/most inclusive indexes for Chinese securities. For this reason, we chose to collaborate with Standard and Poor's (S&P) to provide exposure to the S&P 500 of China. Based on MSCI's current methodology, A-shares could potentially grow to 41% of the MSCI China Index based on full inclusion. Today, the S&P China 500 Index has nearly 52% in A-shares listed Chinese companies. 3 With over 400 mainland listed companies, we believe the index strikes a great balance between breadth and tradability. The WisdomTree China ex-State-Owned Enterprises Index provides exposure to companies in which the government owns less than 20%. A large body of our research shows that government-owned firms are not always run for the benefit of shareholders, which negatively affects returns. This also creates a fairly dramatic shift in sectors away from "Old China" and toward "New China," such as in the Consumer Discretionary and Information Technology sectors. This also results in less sector, share class and single stock concentration than the MSCI China Index. MSCI China has 64% of its weight in Information Technology and Financials, with over 30% of its weight coming from just two companies alone, and is a concentrated bet from a share-class perspective as well within primarily Hong Kong-listed shares. The WisdomTree China ex-State-Owned Enterprises Index conducted a special rebalance in August 2017 to include up to 25% exposure to A-shares. The Chinese equity markets are changing rapidly. The country is home to some of the fastest-growing businesses in the world, some of them best-in-class, and it will be the beneficiary of increased institutional investor positioning in the market as capital market integration continues down its present path. Given these changes, we offer two approaches to China with different trade-offs that both merit investor attention. For a deeper look, check out our full white paper on these indexes. 1 Sources: MSCI, World Federation of Exchanges, as of 3/31/18. 2 RMB 52bn/42bn daily quotas for Northbound/Southbound increased from RMB 13bn/10.5bn. 3 Source: S&P, as of 3/31/18. Investing in Chinese issuers involves special risks, including (but not limited to): currency devaluations and exchange rate fluctuations; intervention by the Chinese government (including risk of nationalization or expropriation); higher rates of inflation; greater political, economic and social uncertainty; market volatility; and lack of market liquidity. The Chinese financial sector is undergoing significant structural and regulatory changes, which have the potential to adversely affect the profitability of Chinese financial companies. The global deterioration of the credit markets since late 2007 generally has had an adverse impact on a wide range of U.S. and international financial institutions and markets. These domestic and global factors may make Chinese financial companies especially vulnerable to losses from rising interest rates, loan defaults, price competition, and credit and equity bubbles and crashes. Consequently, securities issued by Chinese financial companies may exhibit dramatic market price fluctuations. A Shares are equity securities issued by companies incorporated in mainland china and are denominated and traded in renminbi on the Shenzehen and Shanghai Stock Exchanges. Subject to minor exceptions, under current regulations in the People's Republic of China, foreign investors can invest in the domestic securities market only through certain foreign institutional investors that have obtained status as a Qualified Foreign Investor ("QFII") or a Renminbi Qualified Foreign Institutional Investor ("RQFII") from the China Securities Regulatory Commission and have been granted a specific aggregate dollar investment quota.
{ "redpajama_set_name": "RedPajamaC4" }
447
Q: Is there a way to recreate a PDF from a stream in PHP? I am trying to recreate a pdf from pdf streams that gets output from an api. Firstly on the return the header seem to be missing and in firebug I get many errors about XRef (table) stream headers being invalid. I decided that I could simply test by opening a pdf in a text editor and save a txt file and then read from it. From that try to be able to recreate the pdf. Also if I then went and opened the text file and save back to a pdf it will not work anymore. I am new to this and this is my first attempt at it naively believing that it would not be very hard. Is it possible to take output streams of pdf and recreate back to a pdf file? If so how would I go about doing so? I do not know very much about it and have tried to look up a few things but have not got very far. I put a comment but think it would be better here. so a stream is as such: `4 0 obj <</Filter /FlateDecode /Length 890>> stream xœ½V]S1½û´ÿÁñ>ꌦùØd³ Uèà*t†Ç(¥¢ÛVÛ">øã=Iw—–"ÌÈdòu"Üœ{öô¦ü"%Ÿ³RJè\²u^ä^ó°±d^ŠÌ.1Ê"TWYêS功'ù€Gœâ¡œ]j'ƒôòv"k'gŠŸz/Œ*xÒçþ"~Jyff´0Æ/ÀTE&l^,€ZµÔ§Ê?‹0"/µ0ëí Lmr'Ûœ¬ùM*…u9Ÿ§¯ºÜÚÖì"Ï-wOx«›*!¥ä¶"¾"¶:ûŠÓæˆäî$ýü±7kuÿ¨µ°8ŠQqX#s…Ú;î ¹µ£ys4—Ô}…KKát ,¡1V§—ÃÝcæG´I‡4CeÚ£>õhL:~ÌÝo8¿pÛQ_Z'wçýµëB›UoÑoúJ§t":Ãõ»tFCÌú <ü‰Ùÿ4úžm™^÷ý,VëöŠßÔåþ/E endstream endobj` I have tried to decode it using below: note the code above is a snippit of the whole file $pdf_base64 = "assets/evidential-3.txt"; $pdf_base64_handler = fopen($pdf_base64,'r'); $pdf_content = fread ($pdf_base64_handler,filesize($pdf_base64)); $pdf_new = gzdeflate($pdf_content, 890); $pdf = gzinflate($pdf_new); var_dump($pdf_content); exit; As you can see by the names of the varliables i have tried to base64 the code. The api will do something like this: //set response type inputStream = new FileInputStream("/home/pd4mltest.pdf"); //input stream gets the pdf inputStream = new FileInputStream("/home/pd4mltest.pdf"); outputStream = response.getOutputStream(); //set output stream to response OUtils.copy(inputStream, outputStream); I have also tried what has been done in another solution in stackoverflow here where I added: $stringWithFile = "assets/evidential-3.txt"; header('Content-Description: File Transfer'); header("Content-Type: application/pdf"); header('Content-Disposition: attachment; filename=document.pdf'); header('Cache-Control: must-revalidate'); header('Pragma: public'); flush(); file_put_contents("document.pdf", base64_decode($stringWithFile)); readfile("document.pdf"); exit(); But I get these sort of errors: Warning: Unsupported feature "unknown" Error: Invalid XRef stream header pdf.worker.js (line 249) <System> XRef_readXRef@resource://pdf.js/build/pdf.worker.js:3613:13 XRef_parse@resource://pdf.js/build/pdf.worker.js:3207:23 PDFDocument_setup@resource://pdf.js/build/pdf.worker.js:2449:7 PDFDocument_parse@resource://pdf.js/build/pdf.worker.js:2329:7 LocalPdfManager_ensure/<@resource://pdf.js/build/pdf.worker.js:1901:20 LocalPdfManager_ensure@resource://pdf.js/build/pdf.worker.js:1896:1 BasePdfManager_ensureDoc@resource://pdf.js/build/pdf.worker.js:1832:14 loadDocument/</<@resource://pdf.js/build/pdf.worker.js:38456:11 pdf.worker.js (line 251) <System> Warning: Unsupported feature "unknown" pdf.worker.js (line 234) <System> Warning: Indexing all PDF objects pdf.worker.js (line 234) <System> An error occurred while loading the PDF. PDF.js v1.0.473 (build: 1694cd8) Message: InvalidPDFException A: Solved: I made a stupid mistake but is fixed. When returned all I needed to do was: $stringWithFile = $resultjson; header('Content-Type:application/pdf'); header('Content-Disposition:attachment;filename=document.pdf'); file_put_contents("document.pdf", $stringWithFile); readfile('document.pdf'); exit();
{ "redpajama_set_name": "RedPajamaStackExchange" }
735
Q: MySQL - INSERT INTO says I have worng syntax with 'to'='$user2' $time=date("G:i:s j.n.Y"); $wholetime="$time"; mysql_query("INSERT INTO rivase_chat_posts SET sender='$user', content='$msg', time='$wholetime', 'to'='$affectuser'"); $msg=""; I am doing a private chat thing. That is my code. It results this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''to'='gs'' at line 1 ($user="gskartwii", $msg="HI", $affectuser='gs') A: For column names, use backticks rather than single-quotes: `to`='$affectuser' Single quotes are there for strings only. Backticks (normally left of the number 1 on your keyboard) are the things to use for column or table names in mysql. Edit: As Michael Berkowski correctly points out, the reason you have to do this for the column name is because to is a reserved word in mysql - which is a lovely way of saying that it is a special word that mysql sees to mean something within a query normally. on that note, it really might not be the best idea to use the reserved words as columns in your table - you will have to backtick them in every single instance that you use them. You might want to consider renaming it to something like toUser which will probably make the rest of your project easier to SQL out :) A: You put the 'to' between single quotes. Column names are not quoted, or between backquotes. Single quotes are for strings. You cannot update a string, hence SET 'to'='user' is an error. INSERT INTO rivase_chat_posts SET `sender`='$user', `content`='$msg', `time`='$wholetime', `to`='$affectuser' UPDATE: comments say to is a reserved word and should always be escaped - using backquotes. A: To is a reserved word. Escape it: INSERT INTO rivase_chat_posts SET sender='$user', content='$msg', time='$wholetime', `to` ='$affectuser'
{ "redpajama_set_name": "RedPajamaStackExchange" }
6,388
Q: Oracle insert select gives not a GROUP BY expression Edit: database version is Oracle 12c I have two tables,SRC and DEST, and I would like to count the records per id in SRC and insert the result to DEST. The tables are created with the following script: CREATE SEQUENCE "ID_SEQ" INCREMENT BY 1 MAXVALUE 99999 MINVALUE 1 CACHE 20 NOORDER NOCYCLE; CREATE TABLE "SRC_TABLE" ( "S_ID" NUMBER(10,0) NOT NULL, "SEQ" NUMBER(10,0) NOT NULL, "VALUE" VARCHAR2(1) NOT NULL ); CREATE TABLE "DEST_TABLE" ( "D_ID" NUMBER(10,0) DEFAULT ID_SEQ.NEXTVAL NOT NULL, "S_ID" NUMBER(10,0), "CNT" VARCHAR2(1) NOT NULL, "PROCESS_PROG" VARCHAR2(50) NOT NULL ); INSERT INTO SRC_TABLE VALUES (1, 1, '1'); INSERT INTO SRC_TABLE VALUES (1, 2, '1'); INSERT INTO SRC_TABLE VALUES (1, 3, '1'); INSERT INTO SRC_TABLE VALUES (2, 1, '2'); INSERT INTO SRC_TABLE VALUES (2, 2, '2'); INSERT INTO SRC_TABLE VALUES (2, 3, '2'); When I execute the following script it caused the "ORA-00979: not a GROUP BY expression" error: DECLARE PROG_NAME VARCHAR2(50) := 'DEMO'; BEGIN INSERT INTO DEST_TABLE (S_ID, CNT, PROCESS_PROG) SELECT S_ID, COUNT(*), PROG_NAME FROM SRC_TABLE GROUP BY S_ID; END; After some testing, I found that if I replace PROG_NAME with a string then the script worked. DECLARE PROG_NAME VARCHAR2(50) := 'DEMO'; BEGIN INSERT INTO DEST_TABLE (S_ID, CNT, PROCESS_PROG) SELECT S_ID, COUNT(*), 'DEMO' FROM SRC_TABLE GROUP BY S_ID; END; Or, if I explicitly select the value for the D_ID column instead of relying on the DEFAULT value, it also worked: DECLARE PROG_NAME VARCHAR2(50) := 'DEMO'; BEGIN INSERT INTO DEST_TABLE (D_ID, S_ID, CNT, PROCESS_PROG) SELECT ID_SEQ.NEXTVAL, TMP.* FROM ( SELECT S_ID, COUNT(*), PROG_NAME FROM SRC_TABLE GROUP BY S_ID ) TMP; END; I have no idea why the first script failed but the other two worked. What did I do wrong? A: This is statement that failed (according to what you said): SELECT S_ID, COUNT(*), PROG_NAME FROM SRC_TABLE GROUP BY S_ID; When there's an aggregation in a query - count(*) in your example - then all other columns contained in the select column list that aren't aggregated have to be contained in the group by clause. That column is S_ID; PROG_NAME is a local variable and doesn't have to be put into the group by clause. So, why did your code fail? No idea, because it works just fine for me: SQL> DECLARE 2 PROG_NAME VARCHAR2(50) := 'DEMO'; 3 BEGIN 4 INSERT INTO DEST_TABLE (S_ID, CNT, PROCESS_PROG) 5 SELECT S_ID, COUNT(*), PROG_NAME FROM SRC_TABLE 6 GROUP BY S_ID; 7 END; 8 / PL/SQL procedure successfully completed. SQL> select * from dest_table; D_ID S_ID C PROCESS_PROG ---------- ---------- - ---------------------------------------- 1 1 3 DEMO 2 2 3 DEMO SQL> Are you sure it failed? Could you demonstrate it by posting your own SQL*Plus session (just like I did)?
{ "redpajama_set_name": "RedPajamaStackExchange" }
6,925
European Karen Network (EKN) calls on members of the Human Rights Council to support a recommendation by Mr. Tomás Ojea Quintana, the United Nations Special Rapporteur on the situation of human rights in Burma, that the UN consider setting up an inquiry into war crimes and crimes against humanity being committed by the Burmese dictatorship. On Monday the Human Rights Council will meet to discuss the findings and recommendations of Mr Quinatana's report. On 9th March Karen communities in ten countries worldwide held a day of action calling on governments to establish a Commission of inquiry into war crimes and crimes against humanity being committed by the dictatorship. The regime has recently stepped up attacks against Karen civilians. They are trying to crush all opposition to their rule ahead of fake elections later this year. Villagers have been shot on site, more than 80 homes burned down, and a child killed when the Burmese Army fired a mortar bomb at a school. For more information contact Nant Bwa Bwa Phan, board member of European Karen Network, on +447739872481 (European time).
{ "redpajama_set_name": "RedPajamaC4" }
8,336
Ships by type Cassin Young Joseph P. Kennedy Jr. Laffey Orleck The Sullivans Turner Joy Destroyer Escort Mine Sweeper Becuna Bowfin Cavalla Clamagore Croaker Silversides Landing Ship LCI(L)-713 LCI(L)-1091 LCS(L)(3)-102 LST-325 Sloop of War Patrol Boat Riverine PBR - Mobile, AL PBR - Hackensack, NJ PTF 3 PTF 26 Frying-Pan Overfalls Postsmouth Swiftsure American Victory City of Milwaukee Governor Stone Jeremiah O'Brien John W. Brown Lane Victory Milwaukee Clipper Red Oak Victory Valley Camp William A. Irvin William G. Mather Fireboat Edward M. Cotter John J. Harvey Charles W. Morgan Arthur Foss Edna G. John Purves Mazapeta Sand Man Urger USAT LT-5 Mayflower II Ships by State All US Ships International Museumships Presidente Sarmiento City of Adelaide Otway Polly Woodside Drazki Ernest Lapointe Onondaga Peder Skram Sehested Maillé-Brézé Cap San Diego Georgios Averof Kursura Nazario Sauro Hikawa Maru Abraham Crijnssen Noord Hinder Blyskawica Dar Pomorza Mikhail Kutuzov Uluçalireis Glenlee Daniel Adamson Medway Queen Add ship Gunsight Mk14-MOD6 Search this site..... USCGC Comanche - WMEC-202 During WW II the U.S. Navy began to order large heavy duty ocean-going tugs, particularly for the purpose of towing naval vessels damaged and disabled in combat. Eighty-nine ATA tugs were built by end of the war. After commissioning in Texas, ATA-202 proceeded via the Panama Canal to the Pacific reporting for duty in support of the Okinawa campaign at Ulithi atoll. ATs (tugs) were almost indispensable at logistic anchorages and in support of invasions they performed noteworthy service. ATA-202 was awarded one battle star for towing battle-damaged ships out of the line of fire to U.S. Navy facilities for repair. She returned to the United States in September, 1945. ATA-202 began duty in the 11th Naval District at San Diego towing various US Navy vessels and barges as needed. She was reassigned to the Atlantic Reserve Fleet's Texas Group in March 1946 and named USS Wampanoag on July 16, 1948. She was later laid up in the Atlantic Reserve Fleet. In February of 1959, USS Wampanoag was loaned to the U.S. Coast Guard by the U.S. Navy. They commissioned ATA-202 as the USCG Cutter Comanche WATA-202 and later changed this to WMEC-202. On 1 June 1969, the Navy permanently transferred Comanche to the Coast Guard Comanche was first home-ported in California USCG District 11 and later USCG District 12, where she was assigned to law enforcement and search and rescue patrols as well as the re-supply of remote light stations and lightships. She became a well known Coast Guard vessel along the Pacific coast, a standard bearer of the Coast Guard's motto Semper Paratus - "always ready", rendering assistance to numerous ships, fishing boats and recreational vessels and Federal law enforcement service. Examples of Comanche's routine multi-purpose services' included towing the 523-foot tanker SS Cottonwood Creek to safety after it became disabled with fire in the engine room. During the same year she responded to a distress call from the Japanese freighter Kokoku Maru after the freighter collided with another vessel. One Japanese seaman was killed and the other 43 crewmen abandoned their ship and were rescued by the Comanche. She gave the first U.S. "notice of a violation" ever given to a foreign fishing vessel on the Pacific Coast fisheries. In 1967, Comanche was stationed at Corpus Christi, Texas, performing many of the same services it rendered in the Pacific. She also did piracy patrols off the coast of Cuba and South America, intercepting stolen boats. She returned to the west coast in 1969, home ported at Eureka, California until she was decommissioned on 30 January 1980. After a decade of sitting idle on the Sacramento River in California, Comanche was acquired by Dave Howard of Toledo, Washington for private commercial tug service in the early 1990s and moved to the Puget Sound of Washington State. Comanche became one of the largest commercial tugs on the Puget Sound, towing a wide variety of commercial vessels from Mexico to Alaska. On September 11, 2007, Comanche 202 Foundation was granted exempt status by the IRS and in October, vessel Comanche was donated to the Comanche 202 Foundation which is restoring the vessel through the work of volunteers, many of whom actively served on her in their younger days. Museum info: Address: 5618 Marine View Dr., Tacoma, WA 98422 Comanche's website Contact the museum: Hunley PTF-3 PTF-26 C.A. Thayer Col. James M. Schoonmaker Hawaiian Chieftain Sergeant Floyd Baylander Elizabeth Lea Logsdon Thea Foss Virginia V William M. Black San Antonio Computer Repair Powered by WebOke and PvW - © 2014 - 2019
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
1,864
{"url":"https:\/\/zerothdraft.wordpress.com\/2008\/11\/23\/the-drake-equation\/","text":"the Drake equation\n\nOver the last few weeks I\u2019ve done a couple of gigs with some sixth grade teachers, doing some astronomy \u2014 stuff like finding the Moon, measuring the diameter of the Sun via a pinhole projection, touring the universe and so on. One of the pieces I\u2019ve added to this is a discussion and activity where we do a calculation of the Drake equation. It goes like this, more or less:\n\n$N = R^{\\ast} \\times f_p \\times n_e \\times f_{\\ell} \\times f_i \\times f_c \\times L \\!$\n\nIt\u2019s a calculation of the number (N) of possible civilizations out there in our galaxy right now that we could have actual communications with if we were lucky enough. This seems like a semi-silly exercise, kind of fanciful and maybe it\u2019s exactly the kind of thing I\u2019d do just for fun. Well, yes. But also it\u2019s the kind of thing that\u2019s useful to think through because, 1. It mostly sums up all of astronomy, or at least a lot of it, in one capstone kind of discussion; and, 2. It gives you a pretty good indication whether or not you should look up at the sky and think that someone could be looking back at you. This gives you an idea if either wondering or investing time and money into wondering is worth it.\n\nMaybe most important, it tells us something about ourselves. It tells us if we\u2019re really that special or if we\u2019re a funny enigma in the galaxy. Probably we\u2019re both, it turns out. There are enough stars out there and there\u2019s been enough time so that we can be both extremely rare, percentage wise, but also relatively numerous. Maybe.\n\nIf you look at the first 5 terms exclusively, you can afford to be an optimist. These each have to do with the number of stars in our galaxy, the number of these with planets, the average number of Earth-esque planets per system, the potential for life on each one, and the potential for evolution into intelligent life. Using ourselves as the data and inferring from there, these numbers all seem to be fairly promising.\n\nHowever, it\u2019s the last two variables that start to make things interesting, and they\u2019re the most removed from astronomy. Many interesting things are, of course.\n\nfc is the likelihood that life, having evolved to an intelligent state (I\u2019d define this as self-awareness) then creates a technologically advanced society capable of making itself known to other parts of the Galaxy, probably through radio waves. It was when one sixth-grade teacher was contemplating this that she concluded, \u201cWell, I know I could never create that kind of technology myself, so it seems like this requires you to have someone really really smart \u2014 so this must be a really low probability,\u201d or something like this. What was striking to me was that she was the sixth grade teacher; she was the person who was educating my future mayor or the person who will cast a deciding vote or a future astronaut or a best selling writer or a chemist or . . . It didn\u2019t bother me that she didn\u2019t think that she could invent an iPod herself, but I suddenly had this soapbox moment where I got to point out that she (and every other sixth grade teacher out there) was responsible for the next iPhone, the next mayor, the next innovation, and the next salvation. This funny \u201cfc\u201d is something that we all create, and the very fact that we have an educational system, a socialized gathering of knowledge and learning, makes this possible.\n\nShe\u2019d never thought of it that way.\n\nL is the scary number. It\u2019s the length of time that an average civilization keeps the ability to communicate. Basically, thinking about this number makes you think about how long we\u2019re going to keep ourselves around before we screw something up. So far, we\u2019ve been communicating with radio waves for about a century. When someone estimates that the value for L is 150 years, I at first think that maybe they\u2019re being very wise, but then I think less of them. Really \u2014 how do you teach future generations if you see the horizon of our existence? What kind of teaching philosophy do we develop if we think that we\u2019re just biding our time here for a few more years and then, poof, it\u2019s over? I step on a soapbox again for this one, and point out that even if you do have an outlook that looks pretty grim, I really hope that you work to fix what\u2019s going on. In the movie Strange Brew, something I saw when I was in high school, I remember only this one scene: a car heading down a hill, the brakes go out, and the driver lets go of the steering wheel and cries out, \u201cNo point in steering now!\u201d It seems to me that we may be having this tendency with regards to our planet, our existence, and one another, and I lose patience with this. Especially if you\u2019re teaching sixth grade.","date":"2018-01-18 23:57:47","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 1, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.5647358894348145, \"perplexity\": 719.7749363559172}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-05\/segments\/1516084887660.30\/warc\/CC-MAIN-20180118230513-20180119010513-00155.warc.gz\"}"}
null
null
{"url":"http:\/\/mathhelpforum.com\/number-theory\/126778-congruence-integer.html","text":"# Math Help - congruence in integer\n\n1. ## congruence in integer\n\nif [a]=[1] in Zn, prove that (a,n)=1. Show by example that the converse may be false.\n\n2. Originally Posted by Deepu\nif [a]=[1] in Zn, prove that (a,n)=1. Show by example that the converse may be false.\nI assume that $[z]=\\left\\{m\\in\\mathbb{Z}:m\\equiv z\\text{ mod }n\\right\\}$ and $\\mathbb{Z}n=\\mathbb{Z}_n$. If, so assume that $[a]=[1]\\implies a\\in[1]\\implies a\\equiv 1\\text{ mod }n\\implies a=zn+1\\implies a+z'n=1$ where $z'=-z$. The conclusion follows from basic knowledge about linear Diophantine equations.\n\n3. Originally Posted by Deepu\nif [a]=[1] in Zn, prove that (a,n)=1. Show by example that the converse may be false.\n\n$(3,7)=1\\,\\,\\,but\\,\\,\\,[3]\\neq [7]\\,\\,\\,in\\,\\,\\,\\mathbb{Z}_7$\n\nTonio","date":"2015-04-26 02:37:52","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 5, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8476309776306152, \"perplexity\": 1661.2318195427968}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.3, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2015-18\/segments\/1429246652114.13\/warc\/CC-MAIN-20150417045732-00278-ip-10-235-10-82.ec2.internal.warc.gz\"}"}
null
null
Q: Is it a good approach to detect user agent with PHP and then load proper CSS stylesheet? As in topic title, I'm working on some project but my CSS works great in Mozilla but in Opera dimensions in px are different.I was trying to fix that using percent dimensions but other issues appears.It's some kind of Opera problem as it recognise CSS code in other way because when inspecting an element, it returns totally different px dimensions of div's and borders for example.My idea to avoid it is to create separate CSS files for specific browsers and choose correct one after checking user agent?Maybe exists shorter way to solve this problem?I need my website displayed correctly in Mozilla,Opera,Chrome. A: While possible, loading a different CSS based on detected browser is not generally considered best practice and defeats the purpose of CSS. Before you take that decision: * *consider writing cross-browser compatible CSS: * *use em or rem instead of px as a font-size unit; *add browser specific prefixes to properties that require it for added compatibility; *use Can I Use when in doubt - it's a great tool; *check out browser specific selectors As a personal note, I have tried this method myself and quickly fell behind updating all required CSS files. I ended up merging them in a single file about one year later and that change alone was harder than expected.
{ "redpajama_set_name": "RedPajamaStackExchange" }
245
What Makes me Feel Spiritually Sideways? What is keeping you spiritually spent? It's Friday night. I'd rather be watching telly and, in spite of that fact, I'm writing this blog because I know it is the decision that will make me feel at my best. How bad can it be when I have to sit in my "inspirational" office, in the comfort of my own home, and type a message I'm passionate about? I'm grateful to remember that truth this evening because I'm totally susceptible to throwing a mini tantrum about this reality instead. It's hilarious what I will have a tantrum about. How about you? I'm adding something-to-do-with-tantrums to my creative ideas list. Could be pretty funny and eye opening. I was looking forward to getting away, taking a break, kicking back​​​​. I did take a break and kick back. It was nice not to have to think about work. ​​I also found myself feeling a little, spiritually sideways​. I wasn't as go-with-the-flow as I can be​, and I found myself pushing through rather than slowing down even though it was for fun things. It's easy to ignore my needs in the name of having fun​​, but fun is never as much fun when I do. For example, I felt really tired on several days, but because I was excited to be out and about, going to our favorite spots, and seeing friends, I pushed through rather than taking a nap. Since Austin takes a nap from 12-2, I also wanted to get up and out in the mornings so that I wasn't spending half my day at home. Is this really a big deal? No, of course not. It's fun to have fun. Would I change anything? Maybe not. It became so apparent that even though I'm away, I'm still with me. In some ways, this feeling surprised me. In the 12 step community I am accustomed to seeing drug addicts or alcoholics think that moving across the country or to a new town will help with their issues. New people, new place, new start….what could go wrong? Inevitably, because they bring themselves with them, it's just a matter of time before the problem resurfaces. No matter how much I think I might be getting away, I'm not getting away from me. While I had a great time in Texas it became more than apparent that a vacation isn't a solution by itself. I ​​have to attend to my whole self consistently in order to reap the rewards a vacation has to offer. What emotional/spiritual need are you avoiding right now? Leave your answer below. If you love this content and want weekly insights into how to fully express yourself, enter your name and email in the box below. ​​p.s. Did you know that I'm launching a group program designed to help you strengthen your relationship with your partner? Connecting to My Inner Juicy Woman is 7 weeks of learning how to communicate better so that all your relationships can thrive. Check out the information and register here.
{ "redpajama_set_name": "RedPajamaC4" }
4,418
\section{Introduction} \label{intro} Minimum Error Discrimination (MED) is a state hypothesis testing problem in quantum state discrimination. The setting is as follows: Alice selects a state $\rho_i$ with probability $p_i>0$ from an ensemble of $m$ states $\widetilde{P}=\{ p_i >0, \rho_i \}_{i=1}^{m}$, and sends it to Bob, who is then tasked to find the index $i$ from the set $\{1,2,\cdots, m\}$, by performing measurement on the state he receives. His measurement is a generalized POVM of $m$ elements $E = \{ E_i \}_{i=1}^{m}$, and his strategy for hypothesis testing is based on a one-to-one correspondence between the states $ \rho_i \in \widetilde{P}$ and POVM elements $E_i \in E$ such that he will declare having been given $\rho_j$ when his measurement yields the $j$-th outcome. Since the states $\rho_1, \; \rho_2, \; \cdots, \rho_m$ are not necessarily orthogonal they aren't perfectly distinguishable, i.e., there doesn't exist a measurement such that $Tr \left( \rho_i E_j \right) = \delta_{i,j} Tr \left( \rho_i E_i \right), \; \forall \; 1 \ leq i,j \leq m$ unless $Tr \left( \rho_i \rho_j \right) = \delta_{i,j} Tr \left( \rho_i^2 \right), \; \forall \; 1 \leq i,j \leq m$. That $Tr \left( \rho_i E_j \right) \neq 0$ for some $i \neq j$ implies that there may arise a situation where Alice sends the state $\rho_i$ but Bob's measurement yields the $j$-th outcome which leads him to conclude that Alice gave him $\rho_j$. This is an error. The average probability of such error is given by: \begin{equation} \label{Pe} P_e = \sum_{\substack{i,j=1 \\ i\neq j}}^m p_i Tr( \rho_i \Pi_j) \end{equation} where $\{ \Pi_i \}_{i=1}^{m}$ represents an m element POVM with $ \Pi_i \geq 0$ and $ \sum_{i=1}^{m} \Pi_i = \mathbb{1}$. The average probability of success is given by: \begin{equation} \label{Ps} P_s = \sum_{i=1}^m p_i Tr( \rho_i \Pi_i) \end{equation} Both probabilities sum up to 1: \begin{equation} \label{Sum1} P_s + P_e =1 \end{equation} In MED we are given an ensemble and tasked with finding the maximum value that the $P_s$, as defined in equation \eqref{Ps}, attains over the ``space'' of $m$ element POVMs\footnote{It is appropriate to call the set of $m$ element POVMs a space because it is a convex set, inherently implying that there is a notion of additon and scalar multiplication defined between any two points in the set. The restrictions are on the fact that all linear combinations of elements much be convex combinations. Additionally this space is compact.} and the points in the space of $m$ element POVMs where this maximum value is attained. \begin{equation} \label{Pmax} P_{s}^{\text{max}} = \text{Max} \{ P_s \; | \; \{ \Pi_i \}_{i=1}^{m}, \; \Pi_i \geq 0, \; \sum_{i} \Pi_i = \mathbb{1}\} = 1- P_{e}^{\text{min}} \end{equation} Despite the innocuous nature of the problem there have been fairly limited class of ensembles for which the problem has been solved analytically. This includes any ensemble with just two states, i.e., when $m=2$ \cite{Hel}, ensembles of any number where the states are equiprobable and lie on the orbit of a unitary \cite{Ban, Chou}, an ensemble of $3$ qubits \cite{Ha}\footnote{In \cite{Ha} a the general recipe to obtain the optimal POVM for an ensemble of any number of qubits states has been lain down.}, and all pure state ensembles for which the pretty good measurement (PGM) associated with a LI pure state ensemble is its optimal POVM as well \cite{Sasaki}. In \cite{Mas} it was shown that there exists a relation between an ensemble $\widetilde{P}$ and another ensemble $\widetilde{Q} = \{ q_i \geq 0, \sigma_i \}_{i=1}^{m}$, with the condition that $ supp \left( q_i \sigma_i \right) \subseteq supp \left( p_i \rho_i \right)$, $\forall \; 1 \leq i \leq m$, such that the optimal POVM for MED of $\widetilde{P}$ is given by the pretty good measurement (PGM) of $\widetilde{Q}$. In the case of linearly independent pure state ensembles (LIP), it is known that $\sigma_i = \rho_i, \; \forall \; 1 \leq i \leq m$, and it is also known that $\widetilde{Q}$ is given as a function of $\widetilde{P}$. This function is invertible and an analytic expression for the inverse of the function is known. This relation between a LI pure state ensemble and its optimal POVM is of significance in finding the optimal POVM \cite{Singal}. It is, hence, desirable to know if such a function exists for other classes of ensembles too. In \cite{Carlos} it was shown that such a function isn't definable for linearly dependent pure state ensembles. What about mixed states? From \cite{Yohina} we know that the optimal POVM for an ensemble of LI states is a projective measurement where the rank of the $i$-th projector equals the rank of the $i$-th state in the ensemble. As we will later show, this itself exhibits that $rank \left( p_i \rho_i \right) = rank \left( q_i \sigma_i \right)$, $\forall \; 1 \leq i \leq m$, and, since $ supp \left( q_i \sigma_i \right) \subseteq supp \left( p_i \rho_i \right)$, $\forall \; 1 \leq i \leq m$, this implies that $ supp \left( q_i \sigma_i \right) = supp \left( p_i \rho_i \right)$, $\forall \; 1 \leq i \leq m$. This gives us an indication that the aforementioned function may be definable in the general LI state case, i.e., when the states aren't necessarily pure. In this paper we establish that such a function is definable and that it is an invertible function as well. Additionally, we give an analytic expression for the inverse function. In the process we also simplify the necessary and sufficient condition that a POVM has to satisfy to be the optimal POVM for an ensemble of linearly independent states. Also, the necessary and sufficient condition is brought to a rotationally invariant form. This form can be exploited to obtain the optimal POVM for the MED of any LI ensemble. These rotationally invariant conditions tell us that for for each ensemble of LI states, there is a corresponding pure state decomposition such that the ensemble corresponding to this pure state decomposition has an optimal POVM which is itself a pure state decomposition of the optimal POVM for the mixed state ensemble. This fact is used to show when the pretty good measurement of an LI ensemble is its optimal measurment; this is also a generalization of the pure state case. Also, the rotationally invariant conditions suggest a recipe to obtain the optimal POVM for a LI ensemble of states. This technique is polynomial in time and simple to use. The paper is divided into various sections as follows: section \eqref{OPTC} gives the known optimal conditions for the MED of any general ensemble; section \eqref{Mixed} first introduces what is known so far about MED for LI state ensembles and then goes onto establish the main result of the paper, i.e., that every LI state ensemble can be mapped to another LI state ensemble through an invertible map, such that the PGM of the image of the ensemble under the map is the optimal POVM for the MED of the corresponding pre-image ensemble. Establishing the existence of such a map requires a simplification of the known optimality conditions in the case for LI ensembles which we prove. In the same section we also obtain an analaytic expression for the inverse of this map. In section \eqref{compareMEDP} we compare the problem of MED for general LI mixed ensembles with the problem of MED for LI pure state ensembles which are defined on the same Hilbert space $\mathcal{H}$. It is shown that for every LI mixed state ensemble has a pure state decomposition whose optimal POVM is itself a pure state decomposition of the optimal POVM of the mixed state ensemble. Section \eqref{Solution} employs the results developed in section \eqref{Mixed} to give an efficient and simple numerical technique to obtain the optimal POVM for the MED of any LI ensemble. \section{The Optimum Conditions} \label{OPTC} Alice picks a state $\rho_i$ with probability $p_i$ from the ensemble $\widetilde{P} = \{ p_i, \rho_i \}_{i=1}^{m}$ and hand it to Bob for MED. The states $\rho_1, \rho_2, \cdots, \rho_m$ act on a Hilbert space $\mathcal{H}$ of dimension $n$ and $supp \left(p_1\rho_1 \right)$, $supp \left(p_2 \rho_2 \right)$, $\cdots$, $supp \left(p_m\rho_m \right)$ together span $\mathcal{H}$. Bob's task is the optimization problem given by equation \eqref{Pmax}. This optimization is over the space of of $m$ element POVMs, i.e., the space given by $\left\{ \left\{ \Pi_i \right\}_{i=1}^{m}, \text{ where $\Pi_i \geq 0, \; \forall \; 1 \leq i \leq m, \; \sum_{i}^{m} \Pi_i = \mathbb{1}$} \right\}$, where $\mathbb{1}$ is the identity operator on $\mathcal{H}$. To every constrained optimization problem (called the primal problem) there is a dual problem which provides a lower bound if primal problem is a constrained minimization or an upper bound if the primal problem is a constrained maximization to the objective function being optimized in the primal problem. Under certain conditions these bounds are tight implying that one can obtain the solution for the primal problem from its dual. We then say that there is no duality gap between both problems \cite{Boyd}. For MED there is no duality gap and the dual problem can be solved to obtain optimal POVM. This dual problem is given as follows \cite{Yuen}: \begin{equation} \label{dual} \text{Min} \; \text{Tr}(Z) \; \ni \; Z-p_i \rho_i \geq 0, \; \forall\; 1 \leq i \leq m. \end{equation} Also the optimal $m$-element POVM will satisfy the complementarity slackness condition: \begin{equation} \label{cslack} (Z- p_i \rho_i)\Pi_i= \Pi_i(Z-p_i \rho_i)=0, \, \forall \, 1\leq i \leq m. \end{equation} Now summing over $i$ in equation \eqref{cslack} and using the fact that $ \sum_{i=1}^{m} \Pi_i = \mathbb{1}$ we get: \begin{equation} \label{Z} Z= \sum_{i=1}^{m} p_i \rho_i \Pi_i = \sum_{i}^{m} \Pi_i p_i \rho_i. \end{equation} Using equation \eqref{Z} in equation \eqref{cslack}, we get: \begin{eqnarray} & \Pi_j ( Z - p_i \rho_i) \Pi_i = \Pi_j ( Z - p_j \rho_j) \Pi_i, &\; \forall \; 1 \leq i,j \leq m \notag \\ \label{St} \Rightarrow & \Pi_j ( p_j \rho_j - p_i \rho_i ) \Pi_i =0, & \; \forall \; 1 \leq i,j \leq m \end{eqnarray} Equation \eqref{St} was derived by Holevo \cite{Hol}, separately, without using the dual optimization problem stated in the problem \eqref{dual}. Equation \eqref{cslack} and equation \eqref{St} are equivalent to each other. These are necessary but not sufficient conditions. Of the set of $m$ element POVMs which satisfy equation \eqref{cslack} (or equivalently equation \eqref{St}) only a proper subset is optimal. This optimal POVM will satisfy the global maxima conditions given below: \begin{eqnarray} & Z \geq p_i \rho_i \notag &, \; \forall \; 1 \leq i \leq m,\\ \label{Glb} \Longrightarrow & \sum_{k=1}^{m} p_k \rho_k \Pi_k - p_i \rho_i \geq 0,& \; \forall \; 1 \leq i \leq m. \end{eqnarray} Thus the necessary and sufficient conditions for the $m$-element POVM(s) to maximize $P_s$ are given by equations \eqref{cslack} (or equivalently, equation \eqref{St}) and condition \eqref{Glb}. \section{Linearly Independent States} \label{Mixed} Let $\mathcal{H}$ be an $n$ dimensional Hilbert space. Consider a set of $m$ $(\leq n)$ LI states in $\mathcal{H}$, denoted by $P =\{ \rho_i \}_{i=1}^{m}$, where $\rho_i \in \mathcal{B}(\mathcal{H}), \; \rho_i \geq 0, \; Tr(\rho_i)=1,\; \forall \; 1 \leq i \leq m$. Let $r_i \equiv \text{rank}(\rho_i), \;\forall \; 1 \leq i \leq m$. Also let $\sum_{i=1}^m r_i = n$. This implies that $\mathcal{H}$ is fully spanned by supports of $\rho_1, \rho_2, \cdots, \rho_m$ and that the supports of $\rho_1, \rho_2, \cdots, \rho_m$ are linearly independent. Let elements within $P$ be indexed in descending order of $r_i$, i.e., $r_{i}\geq r_{i+1}, \; \forall \; 1 \leq i \leq m-1$. Consider $T \in \mathcal{B}(\mathcal{H})$ to be non-singular; construct an ensemble $\widetilde{P}'=\{ p_i', \rho_i'\}_{i=1}^{m}$ by a congruence transformation on elements of $P$ by $T$ in the following manner: \begin{subequations} \begin{equation} \label{cojens1} \rho'_i \equiv \dfrac{ T \rho_i T^{\dag} }{ Tr(T \rho_i T^{\dag})}, \end{equation} \begin{equation} \label{cojens2} p'_i \equiv \frac{Tr( T \rho_i T^{\dag}) }{ \sum_{\substack{j=1}}^{m} Tr( T \rho_j T^{\dag}) }. \end{equation} \end{subequations} Note (i) $\widetilde{P}'=\{p'_i >0, \, \rho'_i \}_{i=1}^{m}$ is an ensemble of $m$ linearly independent states (ii) rank$(\rho'_i)=r_i, \; \forall \; 1 \leq i \leq m$. Let's denote the transformations in equations \eqref{cojens1} and \eqref{cojens2} concisely by: $\widetilde{P}'= T P T^{\dag}$. Using this define the following set: \begin{equation} \label{ens1} \mathcal{E}(r_1,r_2,\cdots, r_m) \equiv \; \{ T P T^{\dag} \; | \; T \in \mathcal{B}(\mathcal{H}), \; det(T)\neq 0\} \end{equation} $\mathcal{E}(r_1,r_2,\cdots, r_m)$ is the set of LI ensembles where the $i$-th state has rank $r_i$. This is a $2n^2 - \sum_{i=1}^{m} r_{i}^{2} -1$ real parameter space. If $r_{k}=r_{k+1}=\cdots = r_{k+s-1}$, then a single ensemble can be represented by $s!$ elements in $\mathcal{E}(r_1,r_2,\cdots,r_m)$, all of which are equivalent to each other upto a permutation among the $k \text{-th}, (k+1)\text{-th}, \cdots, (k+s-1)\text{-th}$ states\footnote{Allowing for this multiplicity is \emph{just} a matter of convenience, i.e., one could adopt more criteria to do away with such multiplicities but that complicates the description of $\mathcal{E}(r_1,r_2,\cdots,r_m)$ and, for that purpose, such a description is avoided.}. Let us now list what is known so far about the optimal POVMs for MED of LI ensembles. For the case of pure state ensembles (LIP), i.e., when $r_i=1,$ $\forall \; i = 1,2,\cdots,m$\footnote{Note that in this case $m=n$.}, it is already well known that the optimal POVM is given by a unique rank-one projective measurement \cite{Ken}. There is a corresponding result for general LI ensembles and that was explicitly proved in \cite{Yohina}, although it could also be inferred from \cite{Mas}. Therein, it was shown that the optimal POVM for MED of a LI ensemble $\widetilde{P}$ of $m$ states with ranks $r_1, r_2, \cdots, r_m$ respectively, i.e., such that $\widetilde{P} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$, is given by a POVM $\{ \Pi_i \}_{i=1}^{m}$ with the relation $rank(\Pi_i)=r_i, \; \forall \; 1 \leq i \leq m$. Note that the linear independence of the states $\rho_1, \rho_2, \cdots, \rho_m$, is contained in the relation: $\sum_{i=1}^{m}r_i = \; dim\mathcal{H} \; (=n)$ and this relation along with the aforementioned condition, that $rank\left( \Pi_i \right)=r_i$, implies that $\{ \Pi_i \}_{i=1}^{m}$ \emph{has to be} a projective measurement, i.e, $\Pi_i \Pi_j = \delta_{ij} \Pi_i, \; \forall \; 1 \leq i,j \leq m$. The relation $rank\left( \Pi_i \right) = r_i$ also ensures that the optimal POVM is unique. To establish this consider a case where we know that two $m$-element POVMs are optimal for the MED of some LI ensemble in $\mathcal{E}(r_1,r_2,\cdots,r_m)$; let these optimal POVMs (which are projective measurments) be denoted by $\{ \Pi_i^{ \left( 1 \right)} \}_{i=1}^{m}$ and $\{ \Pi_i^{ \left( 2 \right)} \}_{i=1}^{m}$. The rank condition tells us that $rank \left( \Pi_i^{ \left( 1 \right) } \right)= rank \left( \Pi_i^{ \left( 2 \right) } \right) = r_i$, $\forall \; 1 \leq i \leq m$. The only way that a convex combination of both POVMs of the form $\{ p \Pi_i^{ \left( 1 \right) } + (1-p) \Pi_i^{ \left( 2 \right) } \}_{i=1}^{m}$ ( where $ 0 < p < 1$)\footnote{We need to ensure that the POVM, which is a convex combination, is also an $m$ element POVM. That is why convex combinations are only taken in this form.} also satisfies the rank condition ( that $rank \left( p \Pi_i^{ \left( 1 \right) } + (1-p) \Pi_i^{ \left( 2 \right) } \right) = r_i$, $\forall \; 1 \leq i \leq m$) is if $ \Pi_i^{ \left( 1 \right) } = \Pi_i^{ \left( 2 \right) }$, $\forall \; 1 \leq i \leq m$. Another way of saying the same thing is that for $0 < p <1$, $\{ p \Pi_i^{\left( 1 \right) } + (1-p) \Pi_i^{ \left( 2 \right) } \}_{i=1}^{m}$ is a projective measurement iff $ \Pi_i^{ \left( 1 \right) } = \Pi_i^{ \left( 2 \right) }$, $\forall \; 1 \leq i \leq m$.This implies that for MED of any LI ensemble, the optimal POVM is unique. We now define a set, which we denote by $\mathcal{P}(r_1,r_2,\cdots,r_m)$. An element $\{ \Pi_i \}_{i=1}^{m} \in \mathcal{P}(r_1,r_2,\cdots,r_m)$ has the properties: (i) $\sum_{i=1}^{m} \Pi_i = \mathbb{1}$ (ii) $Rank(\Pi_i)=r_i,\; \forall \; 1 \leq i \leq m$ (iii) $\Pi_i \Pi_j = \delta_{ij} \Pi_i$. As noted before, (i) and (ii), along with the relation $\sum_{i=1}^{m} r_i = dim\mathcal{H}$, imply (iii) to hold true. Thus $\mathcal{P}\left(r_1,r_2,\cdots,r_m \right)$ is a subset of the set of projective measurements on $\mathcal{H}$. $\mathcal{P}(r_1,r_2,\cdots,r_m)$ is an $n^2 - \sum_{i=1}^{m} r_i^{2}$ real parameter set. The uniqueness of the optimal POVM for MED of an ensemble of LI states implies that one can unambiguously define ``the optimal POVM map" from $\mathcal{E}(r_1,r_2,\cdots,r_m)$ to $\mathcal{P}(r_1,r_2,\cdots,r_m)$. Let the optimal POVM map be denoted by $\mathscr{P}$. Then $\mathscr{P}: \mathcal{E}(r_1,r_2,\cdots,r_m) \longrightarrow \mathcal{P}(r_1,r_2,\cdots,r_m)$ is such that $\mathscr{P}(\widetilde{P})$ is the unique optimal POVM in $\mathcal{P}(r_1,r_2,\cdots,r_m)$ for the MED of any ensemble $\widetilde{P} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$. In \cite{Mas} it was shown that the optimal POVM for MED of a LI ensemble $\widetilde{P} = \{p_i , \rho_i\}_{i=1}^{m} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$, i.e., $\mathscr{P} \left( \widetilde{P} \right) $, is the PGM of another ensemble of states $\widetilde{Q} = \{q_i, \sigma_i \}_{i=1}^{m}$, where (1) $q_i \geq 0$, $\sum_{i=1}^{m}q_i=1$ and (2) $supp \left( \sigma_i \right) \subseteq supp \left( \rho_i \right)$, for all $ 1 \leq i \leq m$. If we denote $\mathscr{P} \left( \widetilde{P} \right) $ as $ \{ \Pi_i \}_{i=1}^m$, then $\Pi_i$ has the form\footnote{Note that $\left( \sum_{j=1}^{m} q_j \sigma_j \right)^{-\frac{1}{2}}$ is well defined because $\sum_{j=1}^{m} q_j \sigma_j > 0$. This is the consequence of the fact that the supports of $\rho_1, \rho_2, \cdots, \rho_m$ span $\mathcal{H}$}: \begin{equation} \label{formPI} \Pi_i = \left( \sum_{j=1}^{m} q_j \sigma_j \right)^{-\frac{1}{2}} \; q_i \sigma_i \; \left( \sum_{k=1}^{m} q_k \sigma_k \right)^{-\frac{1}{2}}. \end{equation} In the LIP case, i.e., when $r_i =1, \; \forall \; 1 \leq i \leq m$, we know the following: \begin{enumerate} \item{ $q_i > 0, \; \forall \; 1 \leq i \leq m$} \item{$supp(\rho_i) = supp(\sigma_i), \; \forall \; 1 \leq i \leq m$\footnote{Since in the LIP case, $\rho_i$ are all rank one, this means $\rho_i = \sigma_i , \; \forall \; 1 \leq i \leq m$}} \item {The correspondence $\widetilde{P} \rightarrow \widetilde{Q}$ is a map, and it is an invertible map. An analytic expression for the inverse map, i.e. the map from $\widetilde{Q} \rightarrow \widetilde{P}$, was obtained in \cite{Bela, Mas, Carlos}.} \end{enumerate} We are motivated to answer the question whether these results can be extended to cases where $r_i \geq 1$? We already noted that $rank \left(\Pi_i \right)=rank \left( \rho_i \right)$, $ \forall \; 1 \leq i \leq m$. This implies that (1) $q_i >0$\footnote{Had $q_i=0$ for any $i=1,2,\cdots, m$, $ \Pi_i =0$ (see equation \eqref{formPI}). We know that this isn't true because $rank(\Pi_i)=r_i \neq 0$.} and (2) $supp \left( \sigma_i \right) $ $ =$ $ supp \left( \rho_i \right)$\footnote{Since $\sigma_i$ and $\Pi_i$ are related through a congruence transformation $\forall \; 1 \leq i \leq m$ (see equation \eqref{formPI}) it follows that $rank(\sigma_i) = rank \left( \Pi_i \right) = r_i$. Since $supp(\sigma_i)$ is a subspace of $supp(\rho_i)$ and since $rank(\rho_i)= r_i = rank(\sigma_i)$ it follows that $supp(\sigma_i) = supp(\rho_i)$, $\forall \; 1 \leq i \leq m$.}. In this paper we establish that (3) holds for general LI ensembles too, i.e., we first establish that the correspondence $\widetilde{P} \rightarrow \ widetilde{Q}$ is a mapping, then we prove that this is an invertible map and we give an analytic expression for the inverse of this map. Later on we will use the existence of this map to derive a technique to obtain the optimal POVM for a LI ensemble, in the same way as done for LI pure state ensembles in \cite{Singal}. For this purpose defnie the PGM map from $\mathcal{E}(r_1,r_2,\cdots,r_m)$ to $\mathcal{P}(r_1,r_2,\cdots,r_m)$ such that $PGM \left( \widetilde{Q} \right)$ is the pretty good measurment associated with the ensemble and the PGM of the ensemble $\widetilde{Q} = \{q_i, \sigma_i\}_{i=1}^{m}$ is defined by: \begin{equation} \label{PGM} PGM \left( \widetilde{Q} \right) = \{ \left(\sum_{j=1}^{m} q_j \sigma_j \right)^{-\frac{1}{2}} q_i \sigma_i \left(\sum_{k=1}^{m} q_k \sigma_k \right)^{-\frac{1}{2}} \}_{i=1}^{m}. \end{equation} \subsection{The $\widetilde{P} \rightarrow \widetilde{Q}$ Correspondence:} \label{PQcorr} Given that $\mathscr{P} \left( \widetilde{P} \right) = \{\Pi_i \}_{i=1}^{m}$, where $\{\Pi_i \}_{i=1}^{m} \in \mathcal{P}(r_1,r_2,\cdots,r_m)$. Hence $ \Pi_i \Pi_j = \delta_{ij} \, \Pi_i, \; \forall \; 1 \leq \, i,j \, \leq m$. Consider a spectral decomposition of each $\Pi_i$ into pure states: \begin{equation} \label{Pidecomposition} \Pi_i = \sum_{j=1}^{r_i} \ketbra{w_{ij}}{w_{ij}}, \end{equation} where $\braket{w_{i_1j_1}}{w_{i_2j_2}}=\delta_{i_1i_2}\delta_{j_1j_2}$ for $ 1 \leq i_1, i_2 \leq m$ and $1 \leq j_1 \leq r_{i_1}$, $1 \leq j_2 \leq r_{i_2}$. For each $\Pi_i$ there is a $U\left(r_i\right)$ degree of freedom in choosing this spectral decomposition. For now we assume that $\{ \ketbra{w_{ij}}{w_{ij}} \}_{j=1}^{r_i}$ is any spectral decomposition of $\Pi_i$ in equation \eqref{Pidecomposition}. Later on a specific choice of the set $\{ \ket{w_{ij}} \}_{i=1, j=1}^{i=m,j=r_i}$ will be made. Each of the unnormalized density matrices $p_i \rho_i$ can be decomposed into a sum of $r_i$ pure states in the following way: \begin{equation} \label{rhodecomposition} p_i \rho_i = \sum_{j_i=1}^{r_i} \ketbrat{\psi}{ij_i}{\psi}{ij_i}. \end{equation} Here the vectors $\tket{\psi}{ij_i}$ are unnormalized. And the set $\{ \tket{\psi}{ij_i} \}_{j_i=1}^{r_i}$ is LI. Again there is a $U\left( r_i \right)$ degree of freedom in the choice of decomposition of the unnormalized state $p_i \rho_i$ into the vectors $\tket{\psi}{ij_i}$. We assume that some choice of such a decomposition has been made in equation \eqref{rhodecomposition} without any particular bias. Let the gram matrix corresponding to the set $\{ \tket{\psi}{ij_i} \; | \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i\}$ be denoted by $G$, whose matrix elements are given by the following equation: \begin{equation} \label{Gram2} G^{(l \; i)}_{k_l \; j_i}= \tbraket{\psi}{l k_l}{\psi}{i j_i} \end{equation} Some explanation on the indices is in order. All the $n \times n$ matrices that we deal with in this paper are divided into blocks of sizes $r_1, r_2, \cdots, r_m$. The matrix element of such an $n \times n$ matrix is given by two tiers of row indices and two tiers of column indices: the inter-block row (or column) index and the intra-block row (or column) index. The former are represented by the superscript $(l \; i)$, where $l$ represents the row block and $i$ represents the column block in the $n \times n$ matrix, whereas the latter are represented by subscripts $k_l \; j_i$, where $k_l$ represents the $k$-th row and $j_i$ the $j$-th column of the $(l \; i)$-th matrix block of the $n \times n$ matrix. This implies that $1 \leq k_l \leq r_l$ and $1 \leq j_i \leq r_i$. At times subscripts $l$ in $k_l$ and $i$ in $j_i$ are omitted. In such situations it is clear which block the intrablock indices $k$ and $j$ are for. This notation, while at first seems cumbersome, will come in handy later. For each $i=1,2,\cdots, m$, the set $\{ \tket{\psi}{ij_i} \}_{j_i=1}^{r_i}$ is LI. Since $supp \left(p_1 \rho_1 \right),$ $supp \left(p_2 \rho_2 \right),$ $\cdots$, $supp \left(p_m \rho_m \right)$ are LI, the set $\bigcup_{i=1}^{m} \{ \tket{\psi}{ij_i} \}_{j_i=1}^{r_i} $ is LI as well. This implies that $G>0$. Corresponding to the set $\bigcup_{i=1}^{m} \{ \tket{\psi}{ij_i} \}_{j_i=1}^{r_i} $ there is another set of vectors given by: $\{ \tket{u}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ with the property: \begin{equation} \label{psiandu} \tbraket{\psi}{i_1j_1}{u}{i_2j_2} = \delta_{i_1 i_2} \delta_{j_1 j_2}, \; \forall \; 1 \leq i_1,i_2 \leq m \text{ and } 1 \leq j_1 \leq r_{i_1}, \; 1 \leq j_2 \leq r_{i_2}. \end{equation} The vectors $\tket{u}{ij_i}$ can be expanded in the basis $\{ \tket{\psi}{ij} \}_{i=1,j_i=1}^{i=m,j_i=r_i}$ in the following way: \begin{equation} \label{u} \tket{u}{ij_i} = \sum_{l=1}^{m}\sum_{l_k=1}^{r_l} \left( G^{-1} \right)^{(l \; i)}_{k_l \; j_i} \tket{\psi}{lk_l}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq m. \end{equation} From equation \eqref{u} it can be seen that the set $\{ \tket{u}{ij_i} \}_{i=1, \; j_i=1}^{i=m, \; j_i=r_i}$ is a LI set of $n$ vectors. Hence it forms a basis for $\mathcal{H}$. This is also corroborated by the fact that the gram matrix of the set $\{ \tket{u}{ij_i} \}_{i=1, \; j_i=1}^{i=m, \; j_i=r_i}$ is $G^{-1}$. Thus the orthonormal basis vectors $\{ \ket{ w_{ij_i} } \}_{i=1, \; j_i=1}^{i=m, \; j_i=r_i}$, given by equation \eqref{Pidecomposition}, can be expanded in terms of the $\tket{u}{ij_i}$ vectors: \begin{equation} \label{wexpandu} \ket{w_{ij_i}} = \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \left( G^\frac{1}{2} W \right)^{(l \; i)}_{k_l \; j_i} \tket{u}{lk_l}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i \end{equation} where $W$ is an $n \times n$ unitary matrix. There is a one-to-one correspondence between the unitary matrix $W$ and the choice of spectral decomposition in equation \eqref{Pidecomposition}, i.e., fixing the spectral decomposition of the projectors $\Pi_i$ in equation \eqref{Pidecomposition} fixes the unitary $W$ uniquely. This becomes clearer in the following equation: Substituting equation \eqref{wexpandu} in equation \eqref{Pidecomposition} we get: \begin{equation} \label{mixedP} \Pi_i = \sum_{l_1, l_2 = 1}^{m} \sum_{k_1=1}^{r_1} \sum_{k_2=1}^{r_2} \left( \sum_{j=1}^{r_i} \left( G^{\frac{1}{2}}W \right)^{(l_1 \; i)}_{k_1 \; j} \left( W^\dag G^{\frac{1}{2}} \right)^{(i \; l_2)}_{j \; k_2} \right) \ketbrat{u}{l_1 k_1}{u}{l_2 k_2}. \end{equation} Upon substituting the expression for $\Pi_i$ and $\Pi_j$ from equation \eqref{mixedP} into equation \eqref{St} we get the following: \begin{align} \label{St3} \sum_{\substack{ 1 \leq l_1, \; l_2 \leq m, \\ 1\leq k_1 \leq r_{l_1}, \\ 1\leq k_2 \leq r_{l_2} }} \xi^{(l_1 \; l_2)}_{k_1 \; k_2} \ketbrat{u}{l_1 k_1}{u}{l_2 k_2} \; = \; 0 \end{align} where $ \xi^{(l_1 l_2)}_{k_1 k_2}$ is given by: \begin{align} \label{xi} & \xi^{(l_1 \; l_2)}_{k_1 \; k_2} = \notag \\ &\sum_{s=1}^{r_i}\sum_{t=1}^{r_j} \left(G^{\frac{1}{2}}W\right)^{\left( l_1 \; i \right)}_{k_1 \; s} \left( \sum_{h=1}^{r_i} \left( W^\dag G^{\frac{1}{2}} \right)^{\left(i \; i \right)}_{s \; h} \left( G^{\frac{1}{2}}W \right)^{\left(i \; j \right)}_{h \; t} - \sum_{g=1}^{r_j} \left( W^\dag G^{\frac{1}{2}} \right)^{\left(i \; j \right)}_{s \; g} \left( G^{\frac{1}{2}}W \right)^{\left(j \; j \right)}_{g \; t} \right) \left( W^\dag G^{\frac{1}{2}}\right)^{\left(j \; l_2 \right)}_{t \; k_2} \end{align} Equation \eqref{St3} is the stationary condition \eqref{St}. The expression for $\xi^{\left( l_1 \; l_2 \right)}_{k_1 \; k_2}$ in equation \eqref{xi} is pretty complicated. It is desired make equation \eqref{St3} more transparent. With this aim in mind we partition the matrix $G^{\frac{1}{2}} W$ into the aforementioned blocks and introduce a notation for these blocks: \begin{enumerate} \item \begin{equation} \label{part1} G^{\frac{1}{2}} W = \begin{pmatrix} X^{(11)} & X^{(12)} & \cdots & X^{(1m)}\\ X^{(21)} & X^{(22)} & \cdots & X^{(2m)}\\ \vdots & \vdots & \ddots & \vdots\\ X^{(m1)} & X^{(m2)} & \cdots & X^{(mm)} \end{pmatrix} \end{equation} where $X^{(l_1l_2)}$ is the $\left( l_1 l_2 \right) $-th block of dimension $r_{l_1} \times r_{l_2}$ in $G^\frac{1}{2}W$. The matrix elements of $X^{(l_1 l_2)}$ are given by $ \left( X^{(l_1 l_2)} \right)_{k_1 \; k_2} = \left( G^{\frac{1}{2} } W \right)^{\left( l_1 \; l_2 \right)}_{k_1 \; k_2}, \; \forall \, 1 \leq l_1, l_2 \leq m,$ $ \forall \, 1 \leq k_1 \leq r_{l_1}, \; 1 \leq k_2 \leq r_{l_2}$. \item Define: \begin{align} \label{column} & C^{(i)} \equiv \begin{pmatrix} X^{(1i)}\\ X^{(2i)}\\ \vdots \\ X^{(mi)} \end{pmatrix}, \; 1 \leq i \leq m \end{align} Thus $C^{(i)}$ is the $i$-th block column of $G^{\frac{1}{2}}W$. \item Similarly, let's partition $W^\dag G^{-frac{1}{2}}$ into blocks: \begin{equation} \label{part2} W^{\dag}G^{-\frac{1}{2}} \, = \begin{pmatrix} Y^{(11)} & Y^{(12)} & \cdots & Y^{(1m)}\\ Y^{(21)} & Y^{(22)} & \cdots & Y^{(2m)}\\ \vdots & \vdots & \ddots & \vdots\\ Y^{(m1)} & Y^{(m2)} & \cdots & Y^{(mm)} \end{pmatrix} \end{equation} where $\left( Y^{(l_1 l_2)}\right)_{k_1 k_2} = \left( W^{\dag} G^{-\frac{1}{2}} \right)^{\left( l_1 \; l_2 \right)}_{k_1 \; k_2}, \; \forall \, 1 \leq l_1, l_2 \leq m, \; 1 \leq k_1 \leq r_{l_1}$ and $1 \leq k_2 \leq r_{l_2}$. \item Define: \begin{align} \label{row} & R^{(i)} \equiv \begin{pmatrix} Y^{(i1)} & Y^{(i2)} & \cdots & Y^{(im)} \end{pmatrix}, \; 1 \leq i \leq m \end{align} Thus $R^{(i)}$ is the $i$-th block-row of $W^{\dag} G^{-\frac{1}{2}}$. \end{enumerate} Substituting equations \eqref{part1} and \eqref{column} in equation \eqref{St3} we obtain condition \eqref{St} in a more transparent form: \begin{equation} \label{St5} C^{(i)} \left( {X^{(ii)}}^{\dag} X^{(ij)} - {X^{(ji)}}^{\dag} X^{(jj)} \right) {C^{(j)}}^{\dag}\, = \,0, \quad \forall \, 1 \leq i,j \leq m \end{equation} where $ {X^{ji}}^{\dag}$ is the $(ij)$-th block of $W^\dag G^{\frac{1}{2}}$. From the definition of equations \eqref{column} and \eqref{row}, $R^{(i)} C^{(i)} = \mathbb{1}_{r_i}, \quad \forall \, 1 \leq i \leq m$ where $\mathbb{1}_{r_i}$ is the identity matrix of dimension $r_i$. Left and right multiplying the LHS and RHS of equation \eqref{St5} by $R^{(i)}$ and ${R^{(j)}}^\dag$ respectively gives: \begin{eqnarray} & R^{(i)} \, C^{(i)} \left( {X^{(ii)}}^{\dag} X^{(ij)} - {X^{(ji)}}^{\dag} X^{(jj)} \right) {C^{(j)}}^{\dag} \, {R^{(j)}}^{\dag} & = \,0 \notag \\ \label{St5'} \Longrightarrow & {X^{(ii)}}^{\dag} X^{(ij)} - {X^{(ji)}}^{\dag} X^{(jj)} & =0, \; \forall \; 1 \leq i,j \leq m. \end{eqnarray} Let $U_D$ be a block diagonal unitary matrix given in the following equation: \begin{equation} \label{UD} U_D = \begin{pmatrix} U^{(1)} & 0 & \cdots & 0 \\ 0 & U^{(2)} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & U^{(m)} \end{pmatrix} \end{equation} where $U^{(i)}$ is an $r_i \times r_i$ unitary matrix for $i=1,2,\cdots,m$. We remarked earlier that there is a $U(r_i)$ degree of freedom in choice of resolution of spectral decomposition of $\Pi_i$ in equation \eqref{Pidecomposition}. What that means is that $\Pi_i$ is invariant under the transformation: $\ket{w_{ij}} \rightarrow \ket{w_{ij}'} = \sum_{k=1}^{r_i} U^{(i)}_{k j} \ket{w_{ik}} =\sum_{l=1}^{m}\sum_{k=1}^{r_l} \left(U_D \right)^{\left( l \; i \right)}_{k \; j} \ket{w_{lk}} $, where $1 \leq i \leq m, 1 \leq j \leq r_i$. Expanding the vectors $\ket{w'_{ij}}$ in the basis $\{ \tket{u}{ij_i} \}_{i=1, j_i=1}^{r=m,j_i=r_i}$ gives: \begin{equation} \label{wij'} \ket{w_{ij}'} = \sum_{l=1}^{m}\sum_{k=1}^{r_l} \left( G^{\frac{1}{2}}WU_D \right)^{(l \; i)}_{k \; j} \tket{u}{lk}. \end{equation} It is readily seen that this will leave $\Pi_i$ invariant in equation \eqref{mixedP}. Here we make a specific choice of $U_D$, which is so that the diagonal blocks of $G^{\frac{1}{2}}WU_D$ are positive semidefinite, i.e., $X^{(ii)}U^{(i)} \geq 0, \; \forall \, 1 \leq i \leq m $\footnote{ Given some arbitrary choice of spectral decomposition for $ \Pi_1, \Pi_2, \cdots, \Pi_m $ and the fixed unitary $W$ that corresponds to these spectral decompositions, choose $ U^{(1)},U^{(2)},\cdots,U^{(m)}$ such that $X^{(ii)}U^{(i)} \geq 0, \quad \forall \, 1 \leq i \leq m $. It is always possible to find some $U^{(i)}$ such that $X^{(ii)}U^{(i)} \geq 0$ using singular value decomposition of $X^{(ii)}$. Moreover once the non-singularity of the $X^{(ii)}$ matrices has been established (proved in theorem \eqref{Xii}), the unitaries $ U^{(1)},U^{(2)},\cdots,U^{(m)}$ are unique for a given the spectral decompositions of $\Pi_i$'s (and the associated $W$).}. From here onwards we assume that $U_D$ is absorbed within $W$, i.e., $WU_D \rightarrow W$, $X^{(ij)} U^{(j)} \rightarrow X^{(ij)}$ and $\ket{w'_{i j_i}} \longrightarrow \ket{w_{i j_i}}$. This establishes that for any given decomposition of the unnormalized states $p_i \rho_i$ into pure unnormalized states $\tket{\psi}{i j_i}$, as in equation \eqref{rhodecomposition}, there is a unique unitary $W$ such that (1) the ONB $\{ \ket{w_{i j_i}} \}_{i=1, \; j_i=1}^{i=m, \; j_i=r_i}$, defined by equation \eqref{wexpandu}, corresponds to the optimal POVM, in equation \eqref{Pidecomposition} and (2) the matrix $G^\frac{1}{2}W$, which occurs in the equation \eqref{wexpandu}, has positive semi-definite block diagonal matrices\footnote{As mentioned in the footnote above, it is only when we prove that $X^{(ii)}$'s are non-singular, that it will be clear that there exists a unique $U^{(i)}$ such that $X^{(ii)}U^{(i)}>0$. And only then will it be clear that $W \longrightarrow W U_D$ is unique. As it stands now, the non-singularity of the $X^{(ii)}$'s still remains to be proved.} ( i.e., $X^{\left( i i \right)} \geq 0, \; \forall \ ; 1 \leq i \leq m$). This point should be kept in mind since it will be crucial later. Thus equation \eqref{St5'} becomes: \begin{equation} \label{St6} X^{(ii)} X^{(ij)} - {X^{(ji)}}^{\dag} X^{(jj)} =0, \; \forall \; 1 \leq i,j \leq m \end{equation} Define $D$ as the block diagonal matrix containing diagonal blocks of $G^{\frac{1}{2}}W$: \begin{equation} \label{DX} D \equiv \begin{pmatrix} {X^{(11)}} & 0 & \cdots & 0 \\ 0 & {X^{(22)}} & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & {X^{(mm)}} \end{pmatrix} \end{equation} Left multiplying $G^{\frac{1}{2}}W$ by $D$ gives: \begin{equation} \label{DXG} D G^{\frac{1}{2}}W = \begin{pmatrix} (X^{(11)})^2 & {X^{(11)}} X^{(12)} & \cdots & {X^{(11)}} X^{(1m)} \\ {X^{(22)}} X^{(21)} & (X^{(22)})^2 & \cdots & {X^{(22)}} X^{(2m)}\\ \vdots & \vdots & \ddots & \vdots \\ {X^{(mm)}} X^{(m1)} & {X^{(mm)}} X^{(m2)} & \cdots & (X^{(mm)})^2 \end{pmatrix} \end{equation} Equation \eqref{St6} tells us that $D G^{\frac{1}{2}}W$ is a hermitian matrix. From that we get: \begin{equation} \label{Ainv} \left( DG^\frac{1}{2}W \right)^2 = \left( DG^\frac{1}{2}W \right) \; \left( W^\dag G^\frac{1}{2} D \right) = DGD \end{equation} Thus condition \eqref{St} implies that one needs to find a block diagonal matrix, $D=$ $ Diag ($ $X^{(11)},$ $X^{(22)}$ $,\cdots,$ $X^{(mm)} ) $ $\geq0$ where $X^{(ii)}$ is an $r_i \times r_i$ positive semidefinite matrix, so that the diagonal blocks of \emph{a} hermitian square root of the matrix $DGD$ are given by $\left( X^{(11)} \right)^2, \left( X^{(22)} \right)^2, \cdots,\left( X^{(mm)} \right)^2$ respectively. Here $G$ corresponds to the gram matrix of vectors $\{ \tket{\psi}{ij_i} \; | \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i\}$ where $p_i\rho_i = \sum_{j_i=1}^{r_i} \ketbrat{\psi}{ij_i}{\psi}{ij_i}$, for all $i=1,2,\cdots,m$. This is a rotationally invariant condition, i.e., these optimality conditions enable us to get the optimal POVM for any ensemble of the form $U \widetilde{P} U^\dag$, where $U \in U(n)$. Condition \eqref{St} is only one of the necessary and sufficient conditions that the optimal POVM needs to satisfy. The other condition is given by condition \eqref{Glb}. We will prove that both conditions can be subsumed in the statement that $D G^\frac{1}{2} W >0$. We can already see that condition \eqref{St} is contained in the statement $DG^\frac{1}{2}W>0$ because positivity of a matrix subsumes hermiticity as well. But to establish the positivity we first need to prove that $D G^\frac{1}{2} W$ is non-singular for which we only need to establish that $D$ is non-singular (since $G^\frac{1}{2} >0$ and $W$ is unitary, $G^\frac{1}{2} W$ is non-singular). To prove that $D$ is non-singular is equivalent to proving that $X^{(ii)}$ are non-singular, i.e., $X^{(ii)}$ is of rank $r_i$ for all $ 1 \leq i \leq m$. \begin{theorem} \label{Xii} $X^{(ii)}$ is of rank $r_i$, $\forall \; 1 \leq i \leq m$. \end{theorem} \begin{proof} Using equations \eqref{rhodecomposition}, \eqref{mixedP} and \eqref{part1}, the operator $p_i^2 \rho_i \Pi_i \rho_i$ can be expanded in the following operator basis, $\{ \ketbrat{\psi}{ij}{\psi}{lk}\; | \; 1 \leq i, \; l \leq m; \; 1 \leq j \leq r_i, \; 1 \leq k \leq r_l \}$. This gives: \begin{align} \label{ka} p_i^2 \rho_i \Pi_i \rho_i = \sum_{\substack{j, \; k=1}}^{r_i} \left( { \left( X^{\left( ii \right) }\right)}^2 \right)_{jk} \ketbrat{\psi}{ij}{\psi}{ik}. \end{align} Now we know that $rank \left( \Pi_i \right) = r_i, \; \forall \; 1 \leq i \leq m$. So $rank \left( p_i^2 \rho_i \Pi_i \rho_i \right), rank \left( p_i \rho_i \Pi_i \right) ( = rank\left( p_i \Pi_i \rho_i \right) ) $ $\leq r_i, \; \forall \; 1 \leq i \leq m$. We first establish that $rank \left( p_i \rho_i \Pi_i \right) = rank \left( p_i \Pi_i \rho_i \right) = r_i$. Suppose not, i.e., let $rank \left( p_k \rho_k \Pi_k \right) < r_i$. This implies that $\exists \; \ket{v} \in supp \left( \Pi_k \right)- \{0\}$ $\ni \; p_k \rho_k \Pi_k \ket{v} =0$. But since $\Pi_j \ket{v} = 0$ when $j \neq k$ \footnote{ $\ket{v} \in supp{ \left( \Pi_i \right)}$ and $\Pi_i \Pi_j = \Pi_i \delta_{ij}, \; \forall \; 1 \leq i,j \leq m$ implies that $\ket{v} \notin supp \left( \Pi_j \right)$.}, we get that $Z \ket{v} = \sum_{i=1}^{m} p_i \rho_i \Pi_i \ket{v} = 0$ using equation \eqref{Z}. This in turn implies that $Z$ cannot be non-singular. But the optimality condition \eqref{Glb} demands that $Z > 0$. Hence the assumption that $rank \left( p_i \rho_i \Pi_i \right) < r_i$ isn't true for any $1 \leq i \leq m$. This implies that $rank \left( p_i \rho_i \Pi_i \right) = r_i$, $\forall \; 1 \leq i \leq m$. That $rank \left( p_i \rho_i \Pi_i \right)$ $ = rank \left( p_i \Pi_i \rho_i \right)$ $ = rank \left( \Pi_i \right)$ $ = rank \left( \rho_i \right)$ $ = r_i$ implies that any non-zero vector belonging to $supp \left(\Pi_i \right)$ has a non-zero component in $supp \left( \rho_i \right)$ and vice versa for all $1 \leq i \leq m$. This tells us that $\rho_i \ket{v} \neq 0 \Rightarrow p_i^2 \rho_i \Pi_i \rho_i \ket{v} \neq 0, \; \forall \; \ket{v} \in \mathcal{H}$, i.e., $supp \left( \rho_i \right) \subseteq supp \left( p_i^2 \rho_i \Pi_i \rho_i \right)$. We already know that $supp \left( p_i^2 \rho_i \Pi_i \rho_i \right) \subseteq supp\left( \rho_i \right)$. This implies $supp \left( p_i^2 \rho_i \Pi_i \rho_i \right) = supp \left( \rho_i \right)$ which, in turn, implies that $rank \left( p_i^2 \rho_i \Pi_i \rho_i \right) = r_i$, $\forall \; 1 \leq i \leq m$. Using equation \eqref{ka}, this implies that $\left(X^{(ii)}\right)^2$ is of rank $r_i$ and that implies that $X^{(ii)}$ is of rank $r_i$ for all $1 \leq i \leq m$. \end{proof} Theorem \eqref{Xii} implies that $D>0$. And this in turn implies that $D G^\frac{1}{2} W$ is non-singular. We want to now show that the necessary and sufficient optimality conditions given by equation \eqref{cslack} (or equivalently, \eqref{St}) and the inequality \eqref{Glb} are equivalent to the statement that $D G^\frac{1}{2} W >0 $, where $DG^\frac{1}{2}W$ is the matrix occuring in equation \eqref{DXG}. To show that we first need to simplify the optimal POVM conditions for linearly independent states. Let us define a new set of vectors $\{ \tket{\chi}{ij_i} \; | \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i \}$. \begin{equation} \label{chi} \tket{\chi}{ij_i} = \sum_{\substack{k_i=1}}^{r_i} X^{(ii)}_{k_ij_i} \tket{\psi}{ik_i}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i. \end{equation} Since $rank \left( X^{(ii)} \right) = r_i$, $\left\{ \tket{\chi}{ij} \right\}_{j=1}^{r_i}$ is a basis for $Supp(p_i\rho_i)$. And $\{ \tket{\chi}{ij_i} \}_{i=1, j_i=1}^{i=m, j_i = r_i}$ is a basis for $\mathcal{H}$. Now the inner product of any two vectors from the set $\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i = 1}^{i=m, \; j_i=r_i}$ is given by: \begin{equation} \label{innerchi} \tbraket{\chi}{i_1 j_1}{\chi}{i_2 j_2} = \left( DGD \right)^{ \left( i_1 \; i_2 \right) }_{j_1 \; j_2}, \; \forall \; 1 \leq i_1, i_2 \leq m, \; 1 \leq j_1 \leq r_{i_1}, \; 1 \leq j_2 \leq r_{i_2} \end{equation} This shows us that the gram matrix of the set of vectors $\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i = 1}^{i=1, \; j_i=1r_i}$ is the matrix $DGD$. Using this basis we simplify the necessary and sufficient conditions for the optimal POVM for MED of linearly independent states. \begin{theorem} \label{necsufcond} In the problem of MED of a LI ensemble $\{p_i, \rho_i \}_{i=1}^{m}$ if a POVM, represented as $\{\Pi_i\}_{i=1}^{m}$, satisfies the following two conditions then it is the optimal POVM for MED of the said ensemble: \begin{enumerate} \item $\Pi_i \left( p_i \rho_i - p_j \rho_j \right) \Pi_j = 0, \; \forall \, 1 \leq i, \; j \leq m.$ This is equivalently expressed as: $ \left( Z - p_i \rho_i \right) \Pi_i = 0, \; \forall \; 1 \leq i \leq m$, \label{ZGREATER0} \item $Z > 0$, \end{enumerate} where $Z$ is defined as in \eqref{Z}. \end{theorem} \begin{proof} We need to prove that once we find $\{ \Pi_i \}_{i=1}^m$ which satisfies condition 1. and 2., i.e., such that conditions \eqref{cslack} (or equivalently equation \eqref{St}) and \eqref{Glb}, then that implies that $ \sum_{i=1}^{m} p_i \rho_i \Pi_i \geq p_i \rho_i, \; \forall \; 1 \leq i \leq m$. Suppose that 1. has been satisfied. This implies that we found a block diagonal matrix $D\geq0$ (given by equation \eqref{DX}) such that the block-diagonal of \emph{a} hermitian square root of $DGD$ (equation \eqref{DXG}) is $D^2$. The $i$-th block in this block-diagonal matrix $D$ is a positive semi-definite $r_i \times r_i$ matrix denoted by $X^{(ii)}$. Additionally, theorem \eqref{Xii} tells us that the non-singularity of $Z$ implies that $D$ has to be non-singular, i.e., $Det(Z) \neq 0 \Rightarrow Det(D) \neq 0 $. This is equivalent to the statement that $X^{(ii)}$ is of rank $r_i$, i.e., $X^{(ii)}>0, \; \forall \; 1 \leq i \leq m $. Using $X^{(ii)}$ define a new set of vectors as given in equations \eqref{chi}. Let's expand $Z$ and $p_i\rho_i$ in the operator basis $ \{ \ketbrat{\chi}{i_1j_1}{\chi}{i_2j_2} \; | \; 1 \leq i_1, i_2 \leq m, \; 1 \leq j_1 \leq r_{i_1} \text{ and } 1 \leq j_2 \leq r_{i_2} \}$: \begin{align} \label{Zchi} Z & = \sum_{i_1, \; i_2 =1}^{m} \sum_{j_1=1}^{r_{i_1}}\sum_{j_2=1}^{r_{i_2}} \left( W^\dag G^{-\frac{1}{2}} D^{-1} \right)^{(i_1 \; i_2)}_{j_1 \; j_2}\ketbrat{\chi}{i_1j_1}{\chi}{i_2j_2}\\ p_i\rho_i & = \sum_{\substack{k,l=1}}^{r_i} ({X^{(ii)}}^{-2})_{kl} \ketbrat{\chi}{ik}{\chi}{il} \end{align} Thus $Z> 0 \Leftrightarrow W^\dag G^{-\frac{1}{2}}D^{-1} > 0 \Leftrightarrow DG^\frac{1}{2}W >0$. Thus proving : $Z>0 \Rightarrow Z \geq p_i \rho_i, \; \forall \; 1 \leq i \leq m$ is equivalent to proving $ W^\dag G^{-\frac{1}{2}} D^{-1} >0$ $ \Rightarrow W^\dag G^{-\frac{1}{2}} D^{-1} \geq $ $ \left( X^{(ii)} \right)^{-2}$, $\forall \; 1 \leq i \leq m$. Since $W^\dag G^{-\frac{1}{2}} D^{-1}$ $=$ $\left( D G^\frac{1}{2} W \right)^{-1}$, our objective is to prove that given $ \left( D G^\frac{1}{2} W \right)^{-1} >0$ (where $D G^\frac{1}{2} W$ is given by equation \eqref{DXG}) implies that \footnotesize: \begin{eqnarray} \label{invdepict1} & \begin{pmatrix} (X^{(11)})^2 & \cdots & {X^{(11)}} X^{(1i)} & \cdots & {X^{(11)}} X^{(1m)} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ {X^{(ii)}} X^{(i1)} & \cdots & (X^{(ii)})^2 & \cdots & {X^{(ii)}} X^{(im)}\\ \vdots & \ddots & \vdots & \ddots & \vdots \\ {X^{(mm)}} X^{(m1)} & \cdots & {X^{(mm)}} X^{(mi)} & \cdots & (X^{(mm)})^2 \end{pmatrix}^{-1} \geq \begin{pmatrix} 0 & \cdots & 0 & \cdots & 0\\ \vdots & \ddots & \vdots & \ddots & \vdots \\ 0 & \cdots & (X^{(ii)})^{-2} & \cdots & 0\\ \vdots & \ddots & \vdots & \ddots & \vdots \\ 0 & \cdots & 0 & \cdots & 0\\ \end{pmatrix}, \; \forall \; 1 \leq i \leq m & \notag \\ & \Bigg( \text{Permute: } \left\{ \begin{array} {l l l} k \rightarrow & m+k-(i-1), & \forall \; 1 \leq k \leq i-1 \notag \\ k \rightarrow & k-(i-1), & \forall \; i \leq k \leq m \notag \end{array} \right. \Bigg) \notag \\ & \notag \\ \Longleftrightarrow & \begin{pmatrix} (X^{(ii)})^2 & X^{(ii)} X^{\scriptscriptstyle(i \: i+1)} & \cdots & X^{(ii)} X^{\scriptscriptstyle(i \: i-1)}\\ X^{\scriptscriptstyle( i\!{\scriptscriptstyle +}\!1 \: i\!{\scriptscriptstyle +}\!1)} X^{\scriptscriptstyle(i+1 \: i)} & {X^{\scriptscriptstyle( i+1 \: i+1)}}^{2} &\cdots & X^{\scriptscriptstyle(i+1 \: i+1)} X^{\scriptscriptstyle(i+1 \: i-1)}\\ \vdots& \vdots & \ddots & \vdots \\ X^{\scriptscriptstyle(i-1 \: i-1)} X^{\scriptscriptstyle(i-1 \: i)}& X^{\scriptscriptstyle( i-1 \: i-1)} X^{\scriptscriptstyle(i-1 \: i+1)} & \cdots & (X^{\scriptscriptstyle(i-1 \: i-1)})^2 \end{pmatrix}^{-1} \! {\scriptstyle \geq } \begin{pmatrix} (X^{\scriptscriptstyle(ii)})^{\scriptscriptstyle{-2}}& 0 & \cdots & 0\\ 0 & 0 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 0 \end{pmatrix}, \; \forall \; i. \end{eqnarray} \normalsize Define:\begin{align} \left( \begin{array}{c|c} A & \qquad B \qquad \qquad\\ \hline ~ & \qquad ~ \qquad \qquad\\ B^{\dag} & \qquad C \qquad \qquad\\ ~ & \qquad ~ \qquad \qquad \end{array} \right) \equiv \left( \begin{array}{c|ccc} (X^{(ii)})^2 & X^{(ii)} X^{(i \: i+1)} & \cdots & X^{(ii)} X^{(i \: i-1)}\\ \hline X^{( i+1 \: i+1)} X^{(i+1 \: i)} & {X^{( i+1 \: i+1)}}^{2} &\cdots & X^{(i+1 \: i+1)} X^{(i+1 \: i-1)}\\ \vdots & \vdots & \ddots & \vdots \\ X^{(i-1 \: i-1)} X^{(i-1 \: i)} & X^{( i-1 \: i-1)} X^{(i-1 \: i+1)} & \cdots & (X^{(i-1 \: i-1)})^2 \end{array} \right) \end{align} Hence our objective to prove that: \begin{eqnarray} \label{invdepict2} \begin{pmatrix} A & B \\ B^{\dag} & C \end{pmatrix}^{-1} > 0 \Longrightarrow \begin{pmatrix} A & B \\ B^{\dag} & C \end{pmatrix}^{-1} \geq \begin{pmatrix} A^{-1} & 0 \\ 0 & 0 \end{pmatrix} \end{eqnarray} Given that $\bigl(\begin{smallmatrix} A&B\\ B^{\dag}&C \end{smallmatrix} \bigr) > 0$ its inverse is given by \cite{Boyd}: \begin{align} \begin{pmatrix} A & B \\ B^{\dag} & C \end{pmatrix} ^{-1} & = \begin{pmatrix} A^{-1} + Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{pmatrix}\\ & = \begin{pmatrix} A^{-1} & 0 \\ 0 & 0 \end{pmatrix} + \begin{pmatrix} Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{pmatrix} \end{align} where $S_A \equiv (C-B^{\dag}A^{-1}B)^{-1} > 0$ is the inverse of the Schur complement of $A$ in $\bigl(\begin{smallmatrix} A&B\\ B^{\dag}&C \end{smallmatrix} \bigr)$ and $Q \equiv A^{-1}B$ \cite{Boyd}. Hence the inequality \eqref{invdepict2} amounts to proving the following: \begin{eqnarray} \label{invdepict3} \begin{pmatrix} Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{pmatrix} \geq 0 \end{eqnarray} As shown in \cite{Boyd}, if $S_A >0 $, then: $\bigl(\begin{smallmatrix} Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{smallmatrix} \bigr) \geq 0 \Leftrightarrow$ Schur complement of $S_A$ in $\bigl(\begin{smallmatrix} Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{smallmatrix} \bigr) \geq 0$. Now $\bigl(\begin{smallmatrix} A&B\\ B^{\dag}&C \end{smallmatrix} \bigr) > 0 \Longrightarrow S_A > 0$. The Schur complement of $S_A$ in $\bigl(\begin{smallmatrix} Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{smallmatrix} \bigr)$ is equal to $0$. This implies that $\bigl(\begin{smallmatrix} Q S_AQ^{\dag} & -Q S_A \\ -S_A Q^{\dag} & S_A \end{smallmatrix} \bigr) \geq 0$. Hence the inequality \eqref{invdepict3} is true. This proves condition 1. of the theorem (or equivalently condition \eqref{St}) and $Z>0$ subsumes condition given by \eqref{Glb}. This proves the theorem. \end{proof} Hence the necessary and sufficient conditions \eqref{St} (or equivalently equation \eqref{cslack}) and \eqref{Glb} are subsumed in the statement: $DG^{\frac{1}{2}}W >0$. Alternatively, the necessary and sufficient conditions can be put in the following corollary: \begin{corollary} \label{corollary1} The necessary and sufficient condition for an $m$-element POVM $\{ \Pi_i \}_{i=1}^{m}$ to optimally discriminate among an ensemble of $m$ linearly independent states $\{ p_i, \; \rho_i\}_{i=1}^{m}$ is that $\{ \Pi_i \}_{i=1}^{m}$ is a projective measurment and $\sum_{i=1}^{m} p_i \rho_i \Pi_i > 0$. \end{corollary} We can re-express the necessary and sufficient conditions to obtain the optimal POVM for MED of the ensemble $\widetilde{P}$ as: \begin{itemize} \item[\textbf{A}:] \label{AA} One needs to find a block diagonal matrix, $D=$ $ Diag ($ $X^{(11)},$ $X^{(22)}$ $,\cdots,$ $X^{(mm)} ) $ $\geq0$ where $X^{(ii)}$ is an $r_i \times r_i$ positive definite matrix, so that the diagonal blocks of the positive square root of the matrix $DGD$ are given by $\left( X^{(11)} \right)^2, \left( X^{(22)} \right)^2, \cdots,\left( X^{(mm)} \right)^2$ respectively. Here $G$ corresponds to the gram matrix of vectors $\{ \tket{\psi}{ij_i} \; | \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i\}$ where $p_i\rho_i = \sum_{j_i=1}^{r_i} \ketbrat{\psi}{ij_i}{\psi}{ij_i}$, for all $i=1,2,\cdots,m$. \end{itemize} Condition \textbf{A} is a rotationally invariant form of expressing conditions \eqref{cslack} (or equivalently \eqref{St}) and \eqref{Glb}. We will now construct the ensemble $\widetilde{Q} = \{ q_i , \sigma_i \}_{i=1}^{m} \; \in \mathcal{E}(r_1,r_2,\cdots,r_m)$, such that $supp \left( q_i \sigma_i \right) = supp \left( p_i \rho_i \right), \; \forall \; 1 \leq i \leq m$, and for which the relation $PGM \left(\widetilde{Q} \right) \{ \Pi_i \}_{i=1}^{m}$ holds true. Using equation \eqref{chi}, define the following: \begin{equation} \label{sigma} \sigma_i \equiv \frac{1}{\sum_{k_i=1}^{r_i} \tbraket{\chi}{i k_i}{\chi}{i k_i}} \sum_{j_i=1}^{r_i} \ketbrat{\chi}{i j_i}{\chi}{i j_i}, \; \forall \; 1 \leq i \leq m, \end{equation} \begin{equation} \label{qi} q_i \equiv \dfrac{\sum_{j_i=1}^{r_i} \tbraket{\chi}{i j_i}{\chi}{i j_i}}{\sum_{l=1}^{m} \sum_{k_l=1}^{r_l} \tbraket{\chi}{l k_l}{\chi}{l k_l}} , \; \forall \; 1 \leq i \leq m. \end{equation} By the very definition $q_i > 0, \; \forall \; 1 \leq i \leq m$. And since the set $\{ \tket{\chi}{ij_i} \}_{j_i=1}^{r_i}$ spans $supp \left( p_i \rho_i \right)$, we have that $supp \left( q_i \sigma_i \right) = supp \left( p_i\rho_i \right), \; \forall \; 1 \leq i \leq m$. It remains to be shown that $\{ \Pi_i \}_{i=1}^{m}$ is the PGM of $\widetilde{Q}$. \begin{theorem} \label{PGMtheorem} $\{ \Pi_i \}_{i=1}^{m}$ is the PGM of $\widetilde{Q}$, i.e., $ \Pi_i = \left( \sum_{j=1}^{m} q_j \sigma_j \right)^{- \frac{1}{2} } q_i \sigma_i \left( \sum_{k=1}^{m} q_k \sigma_k \right)^{- \frac{1}{2} }, \; \forall \; 1 \leq i \leq m$. \end{theorem} \begin{proof} We introduce a set of vectors complementary to the set $\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i=1}^{i = m, \; j_i = r_i}$ in the same way that the vectors $\{ \tket{u}{i j_i} \}_{i=1, \; j_i=1}^{i = m, \; j_i = r_i}$ is complementary to the set $\{ \tket{\psi}{i j_i} \}_{i=1, \; j_i=1}^{i = m, \; j_i = r_i}$ based on equation \eqref{psiandu}. \begin{equation} \label{chiandomega} \tbraket{\chi}{i_1j_1}{\omega}{i_2j_2} = \delta_{i_1 i_2}\delta_{j_1j_2}, \; \forall \; 1 \leq i_1, i_2 \leq m, \; 1 \leq j_1 \leq r_{i_1}, \; 1 \leq j_2 \leq r_{i_2}. \end{equation} Based on the definition of the vectors $\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i=1}^{i = m, \; j_i = r_i}$ from equation \eqref{chi}: \begin{equation} \label{wu} \tket{\omega}{ij_i} \equiv \sum_{l =1}^{m} \sum_{k_l=1}^{r_l} \left({D}^{-1}\right)^{(l \; i)}_{k_l \; j_i}\tket{u}{l k_l} \end{equation} From the definition of $\tket{\omega}{ij_i}$ in equations \eqref{chiandomega}, \eqref{wu} it is easy to see that $\{ \tket{\omega}{ij_i} \}_{i=1, \; j_i=1}^{i = m, \; j_i = r_i}$ will form a linearly independent set. We can expand $\ket{w_{ij}}$ from equation \eqref{Pidecomposition} in $\tket{\omega}{ij}$: \begin{equation} \label{mixedv3} \ket{w_{ij}} = \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \left( D G^{\frac{1}{2}}W \right)^{(l \; i)}_{k_l \; j}\tket{\omega}{l k_l}, \end{equation} and, similar to equation \eqref{mixedP} we get: \begin{equation} \label{Pomega} \Pi_i = \sum_{l_1, l_2 = 1}^{m} \sum_{k_1=1}^{r_1} \sum_{k_2=1}^{r_2} \left( \sum_{j=1}^{r_i} \left( D G^{\frac{1}{2}}W \right)^{(l_1 \; i)}_{k_1 \; j} \left( W^\dag G^{\frac{1}{2}} D \right)^{(i \; l_2)}_{j \; k_2} \right) \ketbrat{\omega}{l_1 k_1}{\omega}{l_2 k_2}. \end{equation} We will prove that $\left( \sum_{j=1}^{m} q_j \sigma_j \right)^{- \frac{1}{2} } q_i \sigma_i \left( \sum_{k=1}^{m} q_k \sigma_k \right)^{- \frac{1}{2} }$ is equal to the RHS of equation \eqref{Pomega}, $\forall \; 1 \leq i \leq m$. That will prove the theorem. By the definition of $\sigma_i$ in equation \eqref{sigma} we get that $ \sum_{i=1}^{m} q_i \sigma_i $ is given by: \begin{equation} \label{sumsigma} \sum_{i=1}^{m} q_i \sigma_i = \frac{1}{\sum_{s=1}^{m} \sum_{t_s=1}^{r_s} \tbraket{\chi}{s t_s}{\chi}{s t_s}} \sum_{l=1}^{m} \sum_{k_l=1}^{r_l} \ketbrat{\chi}{l k_l}{\chi}{l k_l} \end{equation} Using equation \eqref{sumsigma}, it can easily be verified that: \begin{equation} \label{sumsigmainv} \left( \sum_{i=1}^{m} q_i \sigma_i \right)^{-1} = \left( \sum_{s=1}^{m} \sum_{t_s=1}^{r_s} \tbraket{\chi}{s t_s}{\chi}{s t_s} \right) \sum_{l=1}^{m} \sum_{k_l=1}^{r_l} \ketbrat{\omega}{l k_l}{\omega}{l k_l} \end{equation} Bearing in mind the $DG^\frac{1}{2} W$ is the positive square root of the matrix $DGD$, and that $DGD$ is the gram matrix of the set of vectors $\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i=1}^{i = m, \; j_i = r_i}$, it can be easily verified that: \begin{equation} \label{sumsigmainvsq} \left( \sum_{i=1}^{m} q_i \sigma_i \right)^{-\frac{1}{2}} = \left( \sum_{s=1}^{m} \sum_{t_s=1}^{r_s} \tbraket{\chi}{s t_s}{\chi}{s t_s} \right)^\frac{1}{2} \sum_{l_1=1}^{m} \sum_{k_1=1}^{r_{l_1}} \sum_{l_2=1}^{m} \sum_{k_2=1}^{r_{l_2}} \ketbrat{\omega}{l_1 k_1}{\omega}{l_2 k_2} \left( D G^\frac{1}{2} W \right)^{ \left( l_1 \; l_2 \right) }_{k_1 \; k_2}. \end{equation} Using the expression for $\left( \sum_{i=1}^{m} q_i \sigma_i \right)^{-\frac{1}{2}}$ in equation \eqref{sumsigmainvsq}, the expression for $q_i \sigma_i$ in equations \eqref{sigma} and \eqref{qi} and after a bit of algebra we get the result that $\left( \sum_{j=1}^{m} q_j \sigma_j \right)^{- \frac{1}{2} } q_i \sigma_i \left( \sum_{k=1}^{m} q_k \sigma_k \right)^{- \frac{1}{2} }$ is equal to the RHS of equation \eqref{Pomega}, $\forall \; 1 \leq i \leq m$. This establishes that $\{ \Pi_i \}_{i=1}^{m} = PGM (\widetilde{Q})$. Hence proved. \end{proof} Thus we have shown that for every $\widetilde{P} = \{ p_i, \rho_i \}_{i=1}^{m} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$ there exists an ensemble $\widetilde{Q} = \{ q_i, \sigma_i \}_{i=1}^{m} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$ such that $supp \left( q_i \sigma_i \right) = supp \left( p_i \rho_i \right), \; \forall \; 1 \leq i \leq m$ and such that $\widetilde{Q}$'s PGM is $\{ \Pi_i \}_{i=1}^{m} = \mathscr{P}\left( \widetilde{Q} \right)$. This establishes the $\widetilde{P} \longrightarrow \widetilde{Q}$ correspondence mentioned in the end of the previous subsection. The next question that needs to be answered is whether there was any ambiguity in the way we arrived at the ensemble $\widetilde{Q}$ for a given $\widetilde{P}$? The only ambiguity that we have allowed to remain is in the choice of the decomposition of the states $p_i \rho_i$ in the pure unnormalized states $\tket{\psi}{i j_i}$ in equation \eqref{rhodecomposition}. For a given choice of such a decomposition for all $i = 1, 2, \cdots, m$, we arrived at a unique $n \times n$ unitary $W$ such that the block diagonal matrix $D$, defined in equation \eqref{part1} and equation \eqref{DX}, is positive definite. And using the $X^{(ii)}$ matrices we arrived at the set of states $\tket{\chi}{i j_i}$ in equation \eqref{chi} from which the states $q_i \sigma_i$ were constructed using equations \eqref{sigma} and \eqref{qi}. It is now natural to ask if the final states $q_i \sigma_i$ depend on the choice of the decomposition of the $p_i \rho_i$'s used in equation \eqref{rhodecomposition}. Very briefly we take the reader through the sequence of steps that show that this isn't the case. Let $U'^{(i)}$ be an $r_i \times r_i$ unitary, for $i=1, 2, \cdots, m$. Arrange the $m$ unitary matrices - $U'^{(1)}$, $U'^{(2)}$, $\cdots$, $U'^{(m)}$ as diagonal blocks of an $n \times n$ unitary matrix which we call $U'_D$: \begin{equation} \label{U'D} U'_D = \begin{pmatrix} {U'}^{(1)} & 0 & \cdots & 0 \\ 0 & {U'}^{(2)} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & {U'}^{(m)} \end{pmatrix}. \end{equation} Define the following: \begin{eqnarray} \label{psi'} \tket{\psi '}{i j_i} \equiv \sum_{l=1}^{m} \sum_{k_l =1 }^{r_l} \left( U'_D \right)^{\left( l \; i \right)}_{k_l \; j_i} \tket{\psi}{i j_i}, \; \forall \; 1 \leq i \leq m, 1 \leq j_i \leq r_i, \\ \label{u'} \tket{u '}{i j_i} \equiv \sum_{l=1}^{m} \sum_{k_l =1 }^{r_l} \left( U'_D \right)^{\left( l \; i \right)}_{k_l \; j_i} \tket{u}{i j_i}, \; \forall \; 1 \leq i \leq m, 1 \leq j_i \leq r_i. \end{eqnarray} Note that $p_i \rho_i = \sum_{j=1}^{r_i} \ketbrat{\psi '}{i j_i}{\psi '}{i j_i}$, $\forall \; 1 \leq i \leq m$, which implies that we now have an alternative decomposition of the states $p_i \rho_i$ into the pure states $\tket{\psi}{i j_i}$. Also note that: \begin{equation} \label{psi'andu'} \tbraket{\psi'}{i_1j_1}{u'}{i_2j_2} = \delta_{i_1 i_2} \delta_{j_1 j_2}, \; \forall \; 1 \leq i_1,i_2 \leq m \text{ and } 1 \leq j_1 \leq r_{i_1}, \; 1 \leq j_2 \leq r_{i_2}, \end{equation} which is similar to equation \eqref{psiandu}. Equation \eqref{wexpandu} modifies to: \begin{equation} \label{wexpandu'} \ket{w_{ij_i}} = \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \left( {U'_D}^\dag G^\frac{1}{2} W U'_D \right)^{(l \; i)}_{k_l \; j_i} \tket{u'}{lk_l}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i. \end{equation} Earlier on, we chose the $n \times n$ unitary $W$ in such a manner that the diagonal blocks of $G^\frac{1}{2}W$, i.e., the matrices $X^{(11)}$, $X^{(22)}$, $\cdots$, $X^{(mm)}$ are hermitian (and positive definite). The diagonal blocks now become ${U'^{(1)}}^\dag X^{(11)}$, ${U'^{(2)}}^\dag X^{(22)}$, $\cdots$, ${U'^{(m)}}^\dag X^{(mm)}$. Hence we now employ a different decomposition for the projectors $\Pi_i$ than given in equation \eqref{wexpandu}: \begin{equation} \label{w'expandu'} \ket{w'_{ij_i}} = \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \left( {U'_D}^\dag G^\frac{1}{2} W U'_D \right)^{(l \; i)}_{k_l \; j_i} \tket{u'}{lk_l}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i. \end{equation} The diagonal blocks in this case are ${U'^{(1)}}^\dag X^{(11)} U'^{(1)}$, ${U'^{(2)}}\dag X^{(22)} U'^{(2)}$, $\cdots$, ${U'^{(m)}}\dag X^{(mm)} U'^{(m)}$, which are not only hermitian but positive definite (since $X^{(ii)} > 0, \; \forall \; 1 \leq i \leq m $). Just in the case of equation \eqref{chi}, define: \begin{eqnarray} \label{chi'} & \tket{\chi'}{ij_i} & = \sum_{\substack{k=1}}^{r_i} \left( {U'^{(i)}}^\dag X^{(ii)} U'^{(i)} \right)_{kj} \tket{\psi '}{ik} \notag \\ & ~ & = \sum_{\substack{k=1}}^{r_i} \left( X^{(ii)} U'^{(i)} \right)_{kj} \tket{\psi }{ik}, \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i. \end{eqnarray} Using equation \eqref{chi'} and equation \eqref{chi} it isn't difficult to show that: \begin{equation} \label{chichi'} \sum_{j=1}^{r_i} \ketbrat{\chi '}{i j}{\chi '}{i j} = \sum_{k=1}^{r_i} \ketbrat{\chi }{i k}{\chi }{i k}, \; \forall \; 1 \leq i \leq m. \end{equation} Using equation \eqref{sigma} and \eqref{qi} we get that: \begin{equation} \label{sigma'} \sigma_i = \frac{1}{\sum_{k_i=1}^{r_i} \tbraket{\chi '}{i k_i}{\chi '}{i k_i}} \sum_{j_i=1}^{r_i} \ketbrat{\chi '}{i j_i}{\chi '}{i j_i}, \; \forall \; 1 \leq i \leq m. \end{equation} \begin{equation} \label{q'i} q'_i \equiv \dfrac{\sum_{j_i=1}^{r_i} \tbraket{\chi '}{i j_i}{\chi '}{i j_i}}{\sum_{l=1}^{m} \sum_{k_l=1}^{r_l} \tbraket{\chi '}{l k_l}{\chi '}{l k_l}} , \; \forall \; 1 \leq i \leq m. \end{equation} This establishes that the correspondence $\widetilde{P} \longrightarrow \widetilde{Q}$ is invariant over the choice of pure state decompositions of $p_i\rho_i$\footnote{Actually, this association is also invariant over the choice of spectral decomposition of $\Pi_i$ in equation \eqref{Pidecomposition}. Our choice of spectral decomposition was such that the $D$ matrix, defined in equation \eqref{DX}, is positive definite for the sake of the convenience this offers; this isn't necessary.}. Going through all the steps taken to construct th ensemble $\widetilde{Q}$ from the ensemble $\widetilde{P}$ and the optimal POVM $\mathscr{P}\left( \widetilde{Q} \right) = \{ \Pi_i \}_{i=1}^{m}$, we can see that there is no degree of freedom on account of which the association of $\widetilde{P}$ to $\widetilde{Q}$ can be regarded as ambiguous. This tells us that the correspondence $\widetilde{P} \longrightarrow \widetilde{Q}$ is a map from $\mathcal{E}(r_1,r_2,\cdots,r_m)$ to itself. We denote this map by $\mathscr{R}$; thus we have $\mathscr{R} : \ ens \longrightarrow \mathcal{E}(r_1,r_2,\cdots,r_m)$, such that $\mathscr{R} \left( \widetilde{P} \right) = \widetilde{Q}$ and such that $\mathscr{P}\left(\widetilde{P} \right) = PGM\left(\mathscr{R}\left(\widetilde{P}\right)\right)$. \subsection{Invertibility of $\mathscr{R}$} \label{invertibilityofR} The existence of the map $\mathscr{R}$ was already demonstrated in \cite{Mas}. The reason we went through the elaborate process of re-demonstrating its existence is that these sequence of steps enables us to trivially establish that the map $\mathscr{R}$ is invertible. We first show that $\mathscr{R}$ is onto. \begin{theorem} \label{Ronto} The map $\mathscr{R}$ is onto. \end{theorem} \begin{proof} This means we have to prove that $\forall \; \widetilde{Q} \in \mathcal{E}(r_1,r_2,\cdots,r_m),$ $ \exists \; \text{some } \widetilde{P} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$ $\ni \; \mathscr{R} \left( \widetilde{P} \right) = \widetilde{Q}$. Let $\widetilde{Q} = \{ q_i, \sigma_i \}_{i=1}^{m} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$. Thus $supp \left( q_1 \rho_1 \right)$, $supp \left( q_2 \rho_2 \right)$, $\cdots$, $supp \left( q_m \rho_m \right)$ are LI subspaces of $\mathcal{H}$ of dimensions $r_1, r_2, \cdots, r_m$ respectively. Let the following be a resolution of the state $q_i \sigma_i$ into pure states: \begin{equation} \label{sigmaresolution} q_i \sigma_i = \sum_{j=1}^{r_i} \ketbrat{\zeta}{ij_i}{\zeta}{ij_i}, \; \forall \; 1 \leq i \leq m. \end{equation} There is a $U \left( r_i \right)$ degree of freedom of choosing such a resolution. The set $\{ \tket{\zeta}{ij_i} \}_{i=1, \; j_i = 1}^{i=m, \; j_i = r_i}$ is LI. Let's denote the gram matrix corresponding to the set of states $\{ \tket{\zeta}{ij_i} \}_{i=1, \; j_i = 1}^{i=m, \; j_i = r_i}$ by $F$. The matrix elements of $F$ are given by: \begin{equation} \label{Fmatrixelement} F^{(i_1 \; i_2)}_{j_1 \; j_2} = \tbraket{\zeta}{i_1j_1}{\zeta}{i_2j_2}, \; \forall \; 1 \leq i_1, i_2 \leq m, \; 1 \leq j_1 \leq r_{i_1}, \; 1 \leq j_2 \leq r_{i_2}. \end{equation} $F^{\frac{1}{2}}$ is the positive definite square root of $F$. Partition $F^{\frac{1}{2}}$ in the following manner: \begin{equation} \label{Froot} F^{\frac{1}{2}}= \begin{pmatrix} H^{(11)} & H^{(12)} & \cdots & H^{(1m)} \\ H^{(21)} & H^{(22)} & \cdots & H^{(2m)} \\ \vdots & \vdots & \ddots & \vdots \\ H^{(m1)} & H^{(m2)} & \cdots & H^{(mm)} \end{pmatrix}, \end{equation} where $H^{(ij)}$ is the $\left(i, j \right)$-th block matrix in $F$ and is of dimension $r_i \times r_j$, $\forall \; 1 \leq i, j \leq m$. Note that $F^{\frac{1}{2}} > 0 $ implies that $H^{(ii)} > 0, \; \forall \; 1 \leq i \leq m$. Corresponding to the set $\{ \tket{\zeta}{ij_i} \}_{i=1, \; j_i = 1}^{i=m, \; j_i = r_i}$ $\exists$ another unique set $\{ \tket{z}{ij_i} \}_{i=1, \; j_i = 1}^{i=m, \; j_i = r_i}$ such that \begin{equation} \label{zetaz} \tbraket{\zeta}{i_1j_1}{z}{i_2j_2} = \delta_{i_1, i_2}\delta_{j_1,j_2}, \; \forall \; 1 \leq i_1, \; \leq i_2 \leq m, \; 1 \leq j_1 \leq r_{i_1}, \; 1 \leq j_2 \leq r_{i_2}. \end{equation} The relation that the set $\{ \tket{z}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ bears to $\{ \tket{\zeta}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ is equivalent to that which $\{ \tket{u}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ bears to $\{ \tket{\psi}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ (see equation \eqref{psiandu}); or as $\{ \tket{\omega}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ bears to $\{ \tket{\chi}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ (see equation \eqref{chiandomega}). Let the PGM of $\{q_i, \; \sigma_i \}_{i=1}^{m}$ be denoted by $\{ \Omega_i \}_{i=1}^{m}$. Thus $\Omega_i \geq 0$ and $\sum_{i=1}^{m} \Omega_i \, = \, \mathbb{1}$. In the body of the proof of theorem \eqref{PGMtheorem} we constructed the PGM for an ensemble of mixed states using the pure state decomposition of the corresponding mixed states. Following the same sequence of steps gives us the $\Omega_i$ projectors expanded in the $\{ \ketbrat{z}{l_1 k_1}{z}{l_2k_2} \; | \; 1 \leq l_1,l_2 \leq m, \; 1 \leq l_1 \leq r_{l_1}, \; 1 \leq k_2 \leq r_{l_2} \}$ operator basis: \begin{equation} \label{omegaexp} \Omega_i = \sum_{l_1, l_2 =1}^{m}\sum_{k_1=1}^{r_{l_1}}\sum_{k_2=1}^{r_{l_2}} \left( \sum_{j=1}^{r_i} \left( F^{\frac{1}{2}} \right)^{(l_1 \; i)}_{k_1 \; j} \left( F^{\frac{1}{2}} \right)^{(i \; l_2)}_{j \; k_2} \right) \ketbrat{z}{l_1k_1}{z}{l_2k_2}, \; \forall \; 1 \leq i \leq m. \end{equation} The gram matrix of the set $\{ \tket{z}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$ is given by $F^{-1}$ and using this fact it is trivial to show that the operators $\Omega_i$, given in equation \eqref{omegaexp}, are indeed projectors. Thus we have the PGM of the ensemble $\widetilde{Q}$ with us. Now we construct the ensemble which we will denote by $\widetilde{P'} = \{p'_i, \rho'_i \}_{i=1}^{m}$. This ensemble will be such that $\mathscr{R} \left( \widetilde{P}' \right) = \widetilde{Q}.$ Define the following: \begin{eqnarray} & \tket{\phi}{ij} & \equiv \sum_{k=1}^{r_i} \left( \left( H^{(ii)} \right)^{-\frac{1}{2}} \right)_{kj} \tket{\zeta}{ik}, \; \forall \; 1 \leq i \leq m, \\ \label{p'_irho'_i} & p'_i \rho'_i & \equiv \frac{1}{\sum_{l=1}^{m} \sum_{k_l=1}^{r_l} \tbraket{\phi}{l k_l}{\phi}{l k_l}} \sum_{j_i=1}^{r_i} \ketbrat{\phi}{i j_i}{\phi}{i j_i}, \; \forall \; 1 \leq i \leq m. \end{eqnarray} Note that $supp \left(p_i' \rho_i' \right) = supp \left(p_i \rho_i \right), \; \forall \; 1 \leq i \leq m$. This also implies that $\widetilde{P}' \in \mathcal{E}(r_1,r_2,\cdots,r_m)$. Let's denote $c = \frac{1}{\sum_{l=1}^{m} \sum_{k_l=1}^{r_l} \tbraket{\phi}{l k_l}{\phi}{l k_l}}$. We insert equations \eqref{p'_irho'_i} and \eqref{omegaexp} into equation \eqref{Z} to obtain: \begin{eqnarray} & Z & = \sum_{\substack{i=1}}^{m} p'_i \rho'_i \Omega_i \notag \\ & ~ & = c \sum_{i_1,i_2=1}^{m}\sum_{j_1=1}^{r_{i_1}} \sum_{j_2=1}^{r_{i_2}} \left( F^{-\frac{1}{2}} \right)^{(i_1 \; i_2)}_{j_1 \; j_2}\ketbrat{\zeta}{i_1j_1}{\zeta}{i_2j_2} \; > \; 0 \end{eqnarray} $PGM \left( \widetilde{Q} \right) = \{ \Omega_i \}_{i=1}^{m}$ is a projective measurment and $Z = \sum_{i=1}^{m} p_i \rho_i \Omega_i >0$. By the corollary \eqref{corollary1}, $PGM \left( \widetilde{Q} \right) = \mathscr{P} \left( \widetilde{P'} \right)$. We still need to verify if $\mathscr{R}\left(\widetilde{P}'\right) = \widetilde{Q}$ or not. To this purpose we need to construct the ensemble $\widetilde{Q}'$ from $\widetilde{P}'$ in the same way as $\widetilde{Q}$ was constructed from $\widetilde{P}$ in section \eqref{PQcorr}. Let's start by defining: \begin{equation} \label{DA} D_A \equiv \begin{pmatrix} \left( H^{(11)} \right)^{-\frac{1}{2}} & 0 & \cdots & 0 \\ 0 & \left( H^{(22)} \right)^{-\frac{1}{2}} & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \left( H^{(mm)} \right)^{-\frac{1}{2}} \end{pmatrix} \end{equation} From equation \eqref{p'_irho'_i} we see that the vectors $\{ \tket{\phi}{i j_i} \}_{j_i=1}^{r_i}$ form a resolution of the state $p'_i \rho'_i$. The set of vectors $\{ \tket{\phi}{i j_i} \}_{i=1,\;j_i=1}^{i=m, \; j_i=r_i}$ are LI, so the gram matrix associated with this set, which we denote by $G'$, must be positive definite. Indeed it is given by $G' = c D_A F D_A$ which is positive definite. The matrix equivalent of $G^\frac{1}{2} W$, given in equation \eqref{part1} , in this case is $\sqrt{c} D_A F^\frac{1}{2}$. Note that, upto unitary degree of freedom in the choice of the decomposition of the states $p'_i \rho'_i$ into pure unnormalized states $\tket{\phi}{i j_i}$, the matrix $\sqrt{c} D_A F^\frac{1}{2}$ can be uniquely associated with the ensemble $\{p'_i, \rho'_i \}_{i=1}^{m}, \; \forall \; 1 \leq i \leq m$. The diagonal blocks of $\sqrt{c} D_A F^\frac{1}{2}$ are $\sqrt{c} \left( H^{(11)} \right)^\frac{1}{2}, \; \sqrt{c} \left( H^{(22)} \right)^\frac{1}{2}, \; \cdots, \;\sqrt{c} \left( H^{(mm)} \right) ^\frac{1}{2}$. Hence, the role played by $D>0$, given in equation \eqref{DX}, here is $\sqrt{c} \left(D_A \right)^{-1}$. Thus the matrix equivalent of $D G^\frac{1}{2} W$, given in equation \eqref{DXG}, here is $c F^\frac{1}{2}$ which is positive definite, and whose block diagonals - $c H^{(11)}, \; c H^{(22)}, \cdots, c H^{(mm)}$, are squares of the block diagonals of the matrix $\sqrt{c} D_A F^\frac{1}{2}$. We can construct a new set of vectors $\{ \tket{\zeta'}{ij_i} \}_{i=1,j_i=1}^{i=m,j_i=r_i}$ from $\{ \tket{\phi}{ij_i} \}_{i=1,j_i=1}^{i=m,j_i=r_i}$ in the same way $\{ \tket{\chi}{ij_i} \}_{i=1,j_i=1}^{i=m,j_i=r_i}$ were constructed from $\{ \tket{\psi}{ij_i} \}_{i=1,j_i=1}^{i=m,j_i=r_i}$ in equation \eqref{chi}; the role of $X^{(ii)}$ being played by $\sqrt{c}\left(H^{(ii)}\right)^\frac{1}{2}$. But then we get that $\tket{\zeta'}{ij_i} = \tket{\zeta}{ij_i}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i$. This tells us that $q'_i \sigma'_i = \sum_{j=1}^{r_i} \ketbrat{\zeta'}{ij_i}{\zeta'}{ij_i} $, $\forall \; 1 \leq i \leq m$. This shows us that $\mathscr{R}\left( \widetilde{P'} \right) = \widetilde{Q}$ is indeed true. Hence $\mathscr{R}$ is onto. \end{proof} We next prove that $\mathscr{R}$ is one-to-one. \begin{theorem} \label{Roneone} $\mathscr{R}$ is one-to-one. \end{theorem} \begin{proof} We need to prove that if $ \mathscr{R} \left( \widetilde{P} \right) = \mathscr{R} \left( \widetilde{P'} \right) $ then $\widetilde{P} = \widetilde{P'}$, $\forall \; \widetilde{P}, \widetilde{P'} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$. Let's denote $\widetilde{Q} =\mathscr{R} \left( \widetilde{P} \right) =\{ q_i, \sigma_i \}_{i=1}^{m} $ and $\widetilde{Q'} =\mathscr{R} \left( \widetilde{P'} \right)=\{ q'_i, \sigma'_i \}_{i=1}^{m} $. Let $\widetilde{P} = \{ p_i, \rho_i \}_{i=1}^{m} $ and $\widetilde{P'} = \{ p'_i, \rho'_i \}_{i=1}^{m} $. Given that $\mathscr{R}\left( \widetilde{P} \right) = \widetilde{Q}$. This implies the following: for any pure state decomposition of the states $\{ q_i \sigma_i \}_{i=1}^{m}$, with a corresponding gram matrix $F$, there exists a corresponding pure state decomposition of the states $\{ p_i \rho_i \}_{i=1}^{m}$, with a corresponding gram matrix $G$, such that $G = c D_{A} F D_{A}$, where $D_A$ is as defined in equation \eqref{DA} and $F^\frac{1}{2}$ is as defined in equation \eqref{Froot} and $c$ being the normalization constant. Similarly, given that $\mathscr{R}\left( \widetilde{P'} \right) = \widetilde{Q'}$, any pure state decomposition of the states $\{ q'_i \sigma'_i \}_{i=1}^{m}$, with a corresponding gram matrix $F'$, there exists a corresponding pure state decomposition of the states $\{ p'_i \rho'_i \}_{i=1}^{m}$, with a corresponding gram matrix $G'$, such that $G' = c' {D'}_{A} F {D'}_{A}$, where all the primed quantities ${D'}_A$ and ${F'}^\frac{1}{2}$ are defined similar to unprimed quantities in the equations \eqref{DA} and \eqref{Froot} and $c'$ is the corresponding normalization constant. That $\widetilde{Q}_1 = \widetilde{Q}_2$ implies that for any choice of pure state decomposition of the primed and unprimed ensemble states, there exists a block-diagonal unitary $U_D$ of the form given in equation \eqref{UD}, such that the gram matrices $F$ and $F'$ can be related by the relation: $F' = {U_D}^\dag F {U_D}$. It also implies that ${F'}^\frac{1}{2} = {U_D}^\dag F^\frac{1}{2} {U_D}$, ${D'}_A = {U_D}^\dag D_A {U_D}$. Thus we get the relation that $G' = {U_D}^\dag G {U_D}$. Thus the corresponding pure state decompositions of $\widetilde{P}$ and $\widetilde{P'}$ are related through an equation similar to equation \eqref{psi'} which implies that $\widetilde{P} = \widetilde{P'}$. Hence we have proved that $\mathscr{R}\left(\widetilde{P}'\right)=\mathscr{R}\left(\widetilde{P}\right)$ $\Longleftrightarrow \widetilde{P}'=\widetilde{P}$. Hence $\mathscr{R}$ is one to one. \end{proof} The theorems \eqref{Roneone} and \eqref{Ronto} jointly establish that the map $\mathscr{R}$ is invertible. We summarize all that we have done in this section in the following: \textbf{Hence we have proved the existence of a bijective function $\mathbf{\mathscr{R}: \mathcal{E}(r_1,r_2,\cdots,r_m) \longrightarrow \mathcal{E}(r_1,r_2,\cdots,r_m)}$ such that the optimal POVM for the MED of any LI ensemble $\mathbf{\widetilde{P} \in \mathcal{E}(r_1,r_2,\cdots,r_m)}$, which is given by $\mathbf{\mathscr{P}\left(\widetilde{P}\right)}$, satisfies the following relation:} \begin{equation} \label{SOLFORM} \mathbf{\mathscr{P}\left( \widetilde{P} \right) = PGM \left( \mathscr{R} \left( \widetilde{P} \right) \right).} \end{equation} \textbf{The inverse map $\mathbf{\mathscr{R}^{-1}}$ has an analytic expression:} \begin{equation} \label{invR} \mathbf{\mathscr{R}^{-1}\left( \{ q_i, \sigma_i \}_{i=1}^{m} \right) = \{p_i, \rho_i \}_{i=1}^{m},} \end{equation} \textbf{where, if } \begin{itemize} \item $\mathbf{q_i \sigma_i = \dfrac{1}{\sum_{s=1}^{m}\sum_{t_s=1}^{r_s} \tbraket{\chi}{st_s}{\chi}{st_s}} \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \ketbrat{\chi}{l k_l}{\chi}{l k_l}}$ \item $\mathbf{p_i \rho_i = \dfrac{1}{\sum_{s=1}^{m}\sum_{t_s=1}^{r_s} \tbraket{\psi}{st_s}{\psi}{st_s}}\sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \ketbrat{\psi}{l k_l}{\psi}{l k_l}}$ \end{itemize} \textbf{are pure state decompositions of the states in} $\mathbf{\widetilde{Q}}$ \textbf{and} $\mathbf{\widetilde{P}}$\textbf{ respectively, then} $\mathbf{\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i =1}^{i=m, \; j_i = r_i}}$\textbf{ and }$\mathbf{\{ \tket{\psi}{i j_i} \}_{i=1, \; j_i =1}^{i=m, \; j_i = r_i}}$\textbf{ are related through the transformation:} \begin{equation} \label{psichi} \mathbf{\tket{\psi}{i j} = c \sum_{k=1}^{r_i} \left( \left(H^{(ii)}\right)^{-\frac{1}{2}} \right)_{k j} \tket{\chi}{ik}, \; \forall \; 1 \leq i \leq m, \; 1 \leq j \leq r_i,} \end{equation} \textbf{where $\mathbf{c = \dfrac{1}{\sqrt{\sum_{s=1}^{m}\sum_{t,t_1,t_2 = 1}^{r_s} \left( \left( H^{(ss)} \right)^{-\frac{1}{2}} \right)_{t t_1} \left( F \right)^{(s \; s)}_{t_1 \; t_2} \left( \left( H^{(ss)} \right)^{-\frac{1}{2}} \right)_{t_2 t}}}}$ and where $\mathbf{F}$ is the gram matrix of the set $\mathbf{\{ \tket{\chi}{i j_i} \}_{i=1, \; j_i =1}^{i=m, \; j_i = r_i}}$ and $\mathbf{H^{(ii)}}$'s are as defined in equation \eqref{Froot}.} \section{Comparing MED for Mixed LI ensembles and LI pure state ensembles} \label{compareMEDP} Minimum Error Discrimination is the task of extracting information about a state, by discarding some of the uncertainty of which state Alice sends Bob from the ensemble. Heuristically, one can expect that Bob is required to extract \emph{more} information while performing MED of an ensemble of $n$ LI pure states, which span $\mathcal{H}$, compared to an ensemble of $m$ ($m<n$) LI mixed states, where the supports of these $m$ states also span $\mathcal{H}$. This is because Bob requires to ``probe" the first ensemble ``deeper" compared to the second ensemble of states. This is better appreciated when comparing the MED of a mixed state ensemble and an ensemble of LI pure states which form pure state decompositions of the mixed states in the former. In this case it is a natural to ask if, generally, the optimal POVM for the LI pure state ensemble is a pure state decomposition of the optimal POVM for the mixed state ensemble, i.e., when a mixed state ensemble $\{ p_i, \rho_i \}_{i=1}^{m}$, with optimal POVM $\{ \ Pi_i \}_{i=1}^{m}$, and a pure state ensemble $\{ \lambda_{ij_i}, \ketbra{\psi'_{ij_i}}{\psi'_{ij_i}} \}_{i=1,j_i=1}^{i=m, j_i=r_i}$, with optimal POVM $\{ \ketbra{w'_{ij_i}}{w'_{ij_i}}\}_{i=1,j_i=1}^{i=m, j_i=r_i}$, are related by $p_i \rho_i = \sum_{j=1}^{r_i} \lambda_{ij} \ketbra{\psi'_{ij}}{\psi'{ij}}$ is it generally true that $\Pi_i = \sum_{j=1}^{r_i} \ketbra{w'_{ij}}{w'_{ij}}$, $\forall \; 1 \leq i \leq m$? In general, the answer is no. But we will now show that for every LI mixed state ensemble, one can find a corresponding pure state decomposition such that the optimal POVM for the MED of the ensemble of these LI pure states is a pure state decomposition of the optimal POVM for MED of the mixed state ensemble. Let equation \eqref{rhodecomposition} give a pure state decomposition of $p_i \rho_i, \; \forall \; 1 \leq i \leq m$. Then corresponding to the states $\{ \tket{\psi}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$, there exist a unique set of states $\{ \tket{u}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$, given by equation \eqref{u}, and a unique $n \times n$ unitary $W$, such that the projectors of the optimal POVM for the ensemble $\{p_i, \rho_i \}_{i=1}^{m}$ are given by equation \eqref{mixedP} and the matrix $DG^\frac{1}{2}W >0$, where $G^\frac{1}{2}$ is the positive definite square root of the gram matrix $G$ of the $\tket{\psi}{ij_i}$ vectors and $D$ is defined in equation \eqref{DX}. Using $D$ we construct a new set of vectors $\{ \tket{\chi}{ij_i} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$, as given by equation \eqref{chi} and from this set we constuct a new ensemble of states $\{q_i, \sigma_i \}_{i=1}^{m}$, using equations \eqref{sigma} and \eqref{qi}. It was verified that the optimal POVM $\{ \Pi_i \}_{i=1}^{m} $ is the PGM of the ensemble $\{q_i, \sigma_i \}_{i=1}^{m}$. We now make the $U \left( r_1 \right) \times U \left( r_2 \right) \times \cdots \times U \left( r_m \right)$ degree of freedom in choosing the pure state decomposition in equation \eqref{rhodecomposition} explicit. Thus, let $p_i \rho_i = \sum_{j=1}^{r_i} \ketbrat{\psi'}{ij}{\psi'}{ij}$ be a pure state decomposition of the LI states in the ensemble $p_i \rho_i, \; \forall \; 1 \leq i \leq m$, where $\tket{\psi'}{ij_i}$ and $\tket{\psi}{ij_i}$ are related by equation \eqref{psi'}, where $U'_D$ is a block diagonal unitary given by equation \eqref{U'D}. $U'_D$ is a variable for now; it's value will be fixed later. Corresponding to the primed vectors $\tket{\psi'}{ij_i}$, we have $\tket{u}{ij_i} \longrightarrow \tket{u'}{ij_i}$, as per equation \eqref{u'}, $W \longrightarrow W' = {U'_D}^\dag W U'_D$, $G \longrightarrow G'= {U'_D}^\dag G U'_D$ , $G^\frac{1}{2}W \longrightarrow {G'}^\frac{1}{2}W' = {U'_D}^\dag G^\frac{1}{2}W U'_D$ and $\ket{w_{ij_i}} \longrightarrow \ket{w'_{ij_i}} = \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \left( {G'}^\frac{1}{2} W' \right)^{(l \; i)}_{k_l \; j_i} \tket{u'}{l k_l}$ (equation \eqref{w'expandu'}). $G^\frac{1}{2}W \longrightarrow {U'_D}^\dag G^\frac{1}{2}W U'_D$ implies that $X^{ \left( i j \right)} \ longrightarrow {X'}^{ \left( i j \right)}= {{U'}^{ \left( i \right)}}^\dag X^{ \left( i j \right)} {U'}^{ \left( j \right)}$. In particular we can choose ${U'}^{ \left( i \right)}$ to be such that $ {X'}^{ \left( i i \right)}$ are diagonal, $\forall \; 1 \leq i \leq m$. This fixes the block diagonal unitary $U'_D$. Since $D \longrightarrow D' = {U'_D}^\dag D U'_D$, $D'$ is a diagonal matrix. This implies that $\tket{\chi}{ij_i}\longrightarrow \tket{\chi'}{ij_i} = \sum_{l=1}^{m}\sum_{k_l=1}^{r_l} \left(D'\right)^{(l \; i)}_{k_l \; j_i} \tket{\psi'}{l k_l}$ $=\left(D'\right)^{(i \; i)}_{j_i \; j_i} \tket{\psi'}{ij_i} $. As noted in the end of subsection \eqref{PQcorr}, the ensemble $\{q_i, \sigma_i \}_{i=1}^{m}$ remains invariant. Note that the diagonal of $D' {G'}^\frac{1}{2} W' = \sqrt{D' G' D'}$ is ${D'}^{2}$. Let $\tket{\psi'}{ij_i} = \sqrt{\lambda_{ij_i}}\ket{\psi_{ij_i}}$, where $\ket{\psi_{ij_i}}$ are normalized. According to \cite{Singal} to solve the MED of the LI pure state ensemble $\{\lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$, we need to find an $n \times n$ positive definite diagonal matrix $D''$, such that the diagonal of the positive square root of the matrix $D'' G' D''$ is ${D''}^2$. Here $G'$ is the gram matrix corresponding to the ensemble $\{\lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1, j_i = 1}^{i=m, j_i = r_i}$. But we have already found the solution: $D'' = D'$. In this case the optimal POVM is then given by $\{ \ketbra{w'_{ij_i}}{w'_{ij_i}} \}_{i=1,j_i=1}^{i=m, j_i=r_i}$. And we know that $\Pi_i = \sum_{j=1}^{r_i} \ketbra{w'_{ij_i}}{w'_{ij_i}}$, $\forall \; 1 \leq i \leq m$. Also, just as shown in \cite{Singal}, $\{ \ketbra{w'_{ij_i}}{w'_{ij_i}} \}_{i=1,j_i=1}^{i=m, j_i=r_i}$ is the PGM of the ensemble $\{ \lambda'_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$, where $\lambda'_{ij_i} =\dfrac{ \left( \left( D' \right)^{(i \; i)}_{j_i j_i} \right)^2 \lambda_{ij_i} } { Tr\left(D' G' D'\right)}$. But just as noted above $\tket{\chi'}{ij_i} = \sqrt{ Tr \left( D'G'D' \right) } \sqrt{\lambda'_{ij_i}}\ket{\psi_{ij_i}}$, $\forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i$. \emph{Thus, $\{ \lambda'_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$, whose PGM is the optimal POVM for the ensemble $\{ \lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$, is a pure state decomposition of the ensemble $\{q_i, \sigma_i \}_{i=1}^{m}$ $ ( =\mathscr{R} \left( \widetilde{P} \right))$, whose PGM is the optimal POVM for the ensemble $\{ p_i, \rho_i \}_{i=1}^{m}$, where $\{ \lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$ itself is a pure state decomposition of the ensemble $\{ p_i, \rho_i \}_{i=1}^{m}$}. The feature that ensures that there is a LI pure state decomposition of the mixed state ensemble, such that the optimal POVM of the LI pure state ensemble is a pure state decomposition of the optimal POVM of the LI mixed state ensemble, is the spectral decomposition of the matrices $X^{(ii)}$. This begs the question: for any LI mixed state ensemble, is such a LI pure state decomposition unique? The key feature that is required is that the ${X'}^{(ii)}$ matrices are diagonalized. Hence there are as many pure state decompositions of the mixed state ensemble with this property as there are spectral decompositions of the $D$ matrix. If $X^{(ii)}$ has $s_i$ distinct eigenvalues and the degeneracy of the $j_{i}$-th eigenvalue $( 1 \leq j_i \leq s_i)$ has a degeneracy of $k_{j_i}$\footnote{Needless to say, $\sum_{j_i}^{s_i} k_{j_i} = r_i$.}, then there is a $U(k_{1_1}) \times U(k_{2_1}) \times \cdots \times U(k_{s_1}) \times U(k_{1_2}) \times U(k_{2_2}) \times \cdots \times U(k_{s_2}) \times \cdots \times U(k_{1_ m}) \times U(k_{2_m}) \times \cdots \times U(k_{s_m})$ degree of freedom in choosing a pure state decomposition of the mixed state ensemble with this property. What about the converse? Consider an ensemble of pure states $\{ \lambda_i, \ketbra{\psi_i}{\psi_i} \}_{i=1}^{n}$ whose optimal POVM is $\{ \ketbra{v_i}{v_i} \}_{i=1}^{n}$. Partition the ensemble into disjoint subsets and sum over the elements in each subset and collect all such summations to form a new ensemble $\{p_i, \rho_i \}_{i=1}^{m}$, whose optimal POVM, let's say is given by $\{\Pi_i \}_{i=1}^{m}$. It is generally not the case that $\{ \ketbra{v_i}{v_i} \}_{i=1}^{n}$ is a pure state decomposition of elements in $\{\Pi_i \}_{i=1}^{m}$. So for which pure state ensembles is this true? Let's re-index the pure state ensemble: $i \longrightarrow (i, j_i)$, so that $p_i \rho_i = \sum_{j=1}^{r_i} \lambda_i \ketbra{\psi_{ij_i}}{\psi_{ij_i}}$. While performing the MED of the LI pure state ensemble, if the matrix $DG^\frac{1}{2}W$ is such that its block diagonals\footnote{i.e., the first $r_1 \times r_1$ diagonal block, the second $r_2 \times r_2$ block etc} are diagonal, then it is easy to see that the relation $\Pi_i = \sum_{j=1}^{r_i} \ketbra{v_{ij}}{v_{ij}}$ also holds true. Another question is if, given the problem of the MED of a LI mixed state ensemble, can one substitute the problem with the MED of a pure state decomposition such that the optimal POVM of the latter is a pure state decomposition of the former? The answer, unfortunately, is no. The reason being that to substitute the mixed state ensemble MED problem with the pure state ensemble MED problem one needs to first obtain the $n \times n$ unitary $W$ such that when $D G^\frac{1}{2} W$ is constructed (where $D$ is given by equation \eqref{DX}), it is positive definite. This is already equivalent to finding a solution for the MED of the mixed state ensemble. We know that the optimal POVM of a pure state LI ensemble is given by its own PGM iff the diagonal of the positive square root of the ensemble's gram matrix is a multiple of the identity. How does this condition change when we're given to perform the MED of a LI mixed state ensemble? In the following we prove that this occurs iff the diagonal blocks of $G^\frac{1}{2}$ are diagonalized and when the diagonal of $G^\frac{1}{2}$ is a multiple of the identity. \begin{theorem} \label{PGMOPT} For an ensemble $\widetilde{P} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$ to satisfy $\mathscr{R}\left(\widetilde{P}\right) = \widetilde{P}$ it is necessary and sufficient that all eigenvalues of all the block diagonal matrices of $G^\frac{1}{2}$ are equal. \end{theorem} \begin{proof} \textbf{Necessary Part:} Let $\mathscr{R}\left(\widetilde{P}\right) = \widetilde{P}$. Let the pure state decomposition of $\widetilde{P}$ whose optimal POVM is a pure state decomposition of the optimal POVM for MED of $\widetilde{P}$ be $\{ \lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$. Hence we have $p_i \rho_i = \sum_{j=1}^{r_i} \lambda_{ij} \ketbra{\psi_{ij}}{\psi_{ij}}$, $\forall \; 1 \leq i \leq m$. It was mentioned above that there exists a pure state decomposition of $\mathscr{R}\left( \widetilde{P} \right)$ of the form $\{ \lambda'_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$, who PGM is the optimal POVM of $\{ \lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$. Since $\mathscr{R}\left(\widetilde{P}\right) = \widetilde{P}$ it follows that the $\sqrt{\lambda'_{ij}}\ket{\psi_{ij}}$ ($ = \tket{\psi'}{ij_i}$) vectors and the $\sqrt{\lambda_{ij}}\ket{\psi_{ij}}$ ($ = \tket{\psi}{ij_i}$) vectors are related by a block diagonal unitary transformation, given in equation \eqref{psi'}. But since the set $\{ \ket{\psi_{ij}} \}_{j=1}^{r_i}$ are linearly independent, it follows that $U'_D$ must be a diagonal matrix. This can only mean that both the ensembles $\{ \lambda'_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$ and $\{ \lambda_{ij_i}, \ketbra{\psi_{ij_i}}{\psi_{ij_i}} \}_{i=1,j_i = 1}^{i=m,j_i=r_i}$ are equal, as well. In the beginning of section \eqref{compareMEDP}, it was noted that $\sqrt{\lambda'_{ij_i}} \ket{\psi_{ij_i}}$ and $\sqrt{\lambda_{ij_i}} \ket{\psi_{ij_i}}$ are also related through $\lambda'_{ij_i} =\dfrac{ \left( \left( D' \right)^{(i \; i)}_{j_i j_i} \right)^2 \lambda_{ij_i} } { Tr\left(D' G' D'\right)}$, $\forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i$. But since $\lambda'_{ij_i} = \lambda_{ij}$ , $\forall \; 1 \leq i \leq m, \; 1 \leq j_i \leq r_i$, this implies that $D'$ is a multiple of the identity. This implies that $D' G' D' \propto G'$ which implies that $ \sqrt{D' G' D'} = D' {G'}^\frac{1}{2} W' \propto {G'}^\frac{1}{2}$. This implies that $W = \mathbb{1}_n$. $D'$ is the block diagonal matrix one gets by ``extracting'' the diagonal blocks of ${G'}^\frac{1}{2} W'$. Since $W' = \mathbb{1}_n$, $D'$ is the block diagonal matrix ``extracted'' from ${G'}^\frac{1}{2}$. Similarly, $D$ is the block diagonal matrix ``extracted'' from ${G}^\frac{1}{2}$. And since $D'$ is a multiple of identity and since $D'$ and $D$ are related by a unitary transformation, $D$ is also a multiple of the identity. This tells us that the diagonal blocks of $G^\frac{1}{2}$, i.e., the matrices $X^{(ii)}$, are positive definite diagonal matrices, with equal diagonals. Hence all eigenvalues of all the block diagonal matrices of $G^\frac{1}{2}$ are equal. \textbf{Sufficient Part:} If all eigenvalues of all the block diagonal matrices of $G^\frac{1}{2}$ are equal, then these diagonal blocks are diagonal matrices themselves. Let $D''$ be the matrix comprising of only the diagonal blocks of $G^\frac{1}{2}$. $D''$ is, thus, a multiple of the identity. Note that the the block-diagonal of $D'' {G'}^\frac{1}{2}$ is $ {D''}^2$. Hence we have found a block-diagonal positive definite matrix $D''$ such that the diagonal blocks of the positive square root of $D'' G D''$ is given by ${D''}^2$, which implies that we have solved the MED problem for the ensemble $\widetilde{P}$. Using $D''$, we can construct the vectors $\tket{\chi}{ij_i}$ from the vectors $\tket{\psi}{ij_i}$ using equation \eqref{chi} and then construct the states $q_i \sigma_i$ using equation \eqref{sigma} and equation \eqref{qi}. Since $D''$ is simply a multiple of the identity, it isn't difficult to see that $q_i \sigma_i = p_i \rho_i$, $\forall \; 1 \leq i \leq m$. This proves that $\mathscr{R}\left(R \right) = P$. Hence proved. \end{proof} \section{Solution For the MED problem} \label{Solution} The necessary and sufficient condition to solve the MED for a general LI ensemble as specified by \textbf{A} (on page \pageref{AA}) suggest a technique to solve the problem. In this section we give this technique without going into the theoretical details which justify the claim that it can be used effectively to obtain the optimal POVM for the MED of any ensemble $\widetilde{P} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$. This is because this techhnique is a generalization of the technique given in \cite{Singal}, wherein all the relevant theoretical background has been developed for LI of pure state ensembles. The theoretical background for the mixed states ensemble case is a trivial generalization of that for the pure state ensemble case; it follows the same sequence of steps as that for the LI pure state ensemble case. In the following we explain what the technique is. We assume that we know the solution for the MED of some ensemble $\widetilde{P}_0=\{ p^{(0)}_i, \rho^{(0)}_i \}_{i=1}^{m} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$ and want to obtain the solution for the MED of another ensemble $\widetilde{P}_1=\{ p^{(1)}_i, \rho^{(1)}_i \}_{i=1}^{m} \in \mathcal{E}(r_1,r_2,\cdots,r_m)$. Let $p^{(0)}_i \rho^{(0)}_{i} = \sum_{j=1}^{r_i} \ketbrat{\psi^{(0)}}{ij}{\psi^{(0)}}{ij}, \; \forall \; 1 \leq i \leq m,$ be a pure state decomposition for the ensemble $\widetilde{P}_0$. And let the gram matix corresponding to the set $\{ \tket{\psi^{(0)}}{ij_i} \}_{i=1,j_i =1 }^{m,r_i}$ be $G_0$. Similarly, let $p^{(1)}_i \rho^{(1)}_{i} = \sum_{j=1}^{r_i} \ketbrat{\psi^{(1)}}{ij}{\psi^{(1)}}{ij}, \; \forall \; 1 \leq i \leq m,$ be a pure state decomposition for the ensemble $\widetilde{P}_1$. And let the gram matix corresponding to the set $\{ \tket{\psi^{(1)}}{ij_i} \}_{i=1,j_i =1 }^{m,r_i}$ be $G_1$. Knowing the solution for the MED of $\widetilde{P}_0$ implies that we know a block diagonal matrix $D_0$, of the form as given by equation \eqref{DX}, such that the diagonal-block of positive square root of $D_0G_0D_0$ is $D_0^2$ (in accordance with the rotationally invariant necessary and sufficient conditions given by \textbf{A} on page \pageref{AA}). Let's rewrite equation \eqref{Ainv} in the following form: \begin{equation} \label{EOY} \left( D G^\frac{1}{2} W \right)^2 - DGD = 0 \end{equation} Let's define a linear function $G(t) \equiv (1-t) G_0 + t G_1$, where $t \in [0,1]$. So $G(0)=G_0$ and $G(1)=G_1$. Note that $G(t) > 0$ and $Tr \left( G(t) \right) =1, \; \forall \; 0 \leq t \leq 1$. Thus for any value of $t \in [0,1]$, $G(t)$ corresponds to the gram matrix of a pure state decomposition of some ensemble $\widetilde{P}_t \in \mathcal{E}(r_1,r_2,\cdots,r_m)$\footnote{Actually, $G(t)$, for each value of $t \in [0,1]$, corresponds to a family of unitarily equivalent ensembles, i.e., $G(t)$ corresponds to the set of ensembles $\{ U \widetilde{P}_t U^\dag \; | \; U \text{ varies over } U(n) \}$. The notation $U \widetilde{P}_t U^\dag$ is the same as has been used in equation \eqref{ens1}.}. Using equation \eqref{EOY} we drag the solution for $D$ from $t=0$ where the value is known to $t=1$ where the solution isn't known. This can be done in different ways. \subsection{Taylor Series Expansion and Analytic Continuation} \label{Taylor} A formal way of doing it is by using Taylor series expansion and analytic continuation. We start by assuming that the matrices $\left( DG^\frac{1}{2}W \right) (t), D(t)$ and $G(t)$ are analytic functions from $[0,1]$\footnote{$G(t)$ is the function mentioned above; it is linear in $t$ and hence is analytic in $t$. We will not provide for the proof of the analytic dependence of $\left( DG^\frac{1}{2}W \right) (t)$ or $ D(t)$ here since a detailed proof the same is provided in \cite{Singal} for the pure state ensemble case which can be trivially generalized to the mixed state case.}. $D(t)$ take the form \begin{equation} \label{DT} D(t) = \begin{pmatrix} {Z^{(11)(t)}} & 0 & \cdots & 0 \\ 0 & {Z^{(22)(t)}} & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & {Z^{(mm)(t)}} \end{pmatrix}, \end{equation} and $\left( DG^\frac{1}{2} W \right) (t)$ takes the form \begin{equation} \label{DGWT} \left( DG^{\frac{1}{2}} W \right) (t) = \begin{pmatrix} \left( Z^{(11)} (t) \right)^2 & Z^{(12)}(t) & \cdots & Z^{(1m)}(t)\\ Z^{(21)}(t) & \left( Z^{(22)} (t) \right)^2 & \cdots & Z^{(2m)} (t)\\ \vdots & \vdots & \ddots & \vdots\\ Z^{(m1)}(t) & Z^{(m2)}(t) & \cdots & \left( Z^{(mm)}(t) \right)^2 \end{pmatrix}, \end{equation} where \begin{equation} \label{ZijT} Z^{(ij)}(t) = \begin{pmatrix} r^{(ij)}_{11}(t) + i c^{(ij)}_{11}(t) & r^{(ij)}_{12}(t) + i c^{(ij)}_{12}(t) & \cdots & r^{(ij)}_{1r_j}(t) + i c^{(ij)}_{1r_j}(t) \\ r^{(ij)}_{21}(t) + i c^{(ij)}_{21}(t) & r^{(ij)}_{22}(t) + i c^{(ij)}_{22}(t) & \cdots & r^{(ij)}_{2r_j}(t) + i c^{(ij)}_{2r_j}(t) \\ \vdots & \vdots & \ddots & \vdots \\ r^{(ij)}_{r_i 1}(t) + i c^{(ij)}_{r_i1}(t) & r^{(ij)}_{r_i2}(t) + i c^{(ij)}_{r_i2}(t) & \cdots & r^{(ij)}_{r_ir_j}(t) + i c^{(ij)}_{r_ir_j}(t) \\ \end{pmatrix}, \end{equation} i.e, $Z^{(ij)}(t)$ are $r_i \times r_j$ matrices. Also, the hermiticity of $\left( DG^\frac{1}{2} W \right) (t)$ requires that $c^{(ii)}_{jk}(t) = - c^{(ii)}_{kj}(t) , \; 1 \leq i \leq m, \; 1 \leq j, k \leq r_i$. With the constraints on $c^{(ii)}_{jk}(t)$ in place, $r^{(il)}_{j_ik_l}$ and $c^{(il)}_{j_ik_l}$ are $n^2$ (dependent) variables. In the following we show how to obtain the Taylor series expansion of these variables with respect to the independent variable $t$. Note that $Z^{(ii)}$ are equal to $X^{(ii)}$ and $Z^{(ij)}(t)$ are equal to $ \left( X^({ii}) \right)^{-1} X^{(ij)}$ forall $1 \leq i \neq j \leq m$, where $X^{(ij)}$ are defined in equation \eqref{part1}. Taking the total derivative of both sides of equation \eqref{EOY} with respect to $t$ and set $t= 0$, we get $n^2$ coupled linear equations which can be solved for the unknowns $\dfrac{d r^{(i l)}_{j_i k_l}}{dt} |_{t=0}$ and $\dfrac{d c^{(i l)}_{j_i k_l}}{dt} |_{t=0}$, $\forall \; 1 \leq i, l \leq m,$ $1 \leq j_i \leq r_i$ and $1 \leq k_l \leq r_l$. Again taking the second order total derivative of both sides of equation \eqref{EOY} with respect to $t$ and setting $t=0$, we get $n^2$ coupled linear equations which can be solved for the unknowns $\dfrac{d^2 r^{(i l)}_{j_i k_l}}{dt^2} |_{t=0}$ and $\dfrac{d^2 c^{(i l)}_{j_i k_l}}{dt^2} |_{t=0}$, $\forall \; 1 \leq i, l \leq m,$ $1 \leq j_i \leq r_i$ and $1 \leq k_l \leq r_l$. In this way we have obtain the $K$-th order derivatives of the $r^{il}_{j_ik_l}$ and $c^{il}_{j_ik_l}$ with respect to $t$ at $t=0$. Using these derivatives we can taylor expand about $r^{il}_{j_ik_l}(t)$ and $c^{il}_{j_ik_l}(t)$ about $t=0$. Our goal is to find a solution for the values of $r^{il}_{j_ik_l}(1)$ and $c^{il}_{j_ik_l}(1)$. It is reasonable to divide the interval $[0,1]$ into a certain number of intervales, say $L$ intervals, so that one taylor expands within every interval and then analytically continues from the starting point of each interval to reach $t=1$ finally. The following statements are made on the basis of results in \cite{Singal}: \begin{itemize} \item $L\equiv \lceil|| G(0) - G(1) || n^{2}\rceil$ gives a reasonable number of intervals for very low error margin. Also beyond a certain order to which Taylor series are expanded the error margin doesn't decrease appreciably; neither does the error margin increase appreciably as $n$ increases while the order to which Taylor series is expanded remained constant. \item For ensembles $\widetilde{P}_1 \in \mathcal{E}(r_1,r_2,\cdots,r_m)$, to which the gram matrix $G_1$ corresponds, one can find the starting point gram matrix $G_0$ close enough to $G_1$ such that $\lceil|| G(0) - G(1) || n^{2}\rceil=1$. This implies that the interval $[0,1]$ need not be divded into subintervals for the purpose of analytic continuation. For these cases the computational complexity of such process is $n^6$. In cases where one isn't able to obtain the starting point close enough, the computional complexity increases to $n^8$, as expected. This is because the number of intervals required to obtain the solution increases as $n^2$ with $n$. \end{itemize} \subsection{Newton-Raphson Method} \label{Newton} Another technique to obtain the solution for the the MED of optimal POVM for a LI ensemble is to use Newton's method based on equation \eqref{EOY}. As starting point, we substitute the solutions for the MED of $G_0$ viz., $D_0$ and $D_0G_0^\frac{1}{2} W_0$, whose values we know, in equation \eqref{EOY}, along with $G_1$. The aim is to change the values of $D$ and $DG^\frac{1}{2}W$ so that the LHS of the equation converges to $0$\footnote{Despite the fact that we have no formal proof that Newton-Raphson method will necessarily converge to the desired solution for equation \eqref{EOY}, over 100,000 examples for various values of $n$ and $r_1, r_2, \cdots, r_m$ have been sampled, for which the method works. An undesirable solution would require that the LHS of equation \eqref{EOY} does converge to $0$ but that $DG^\frac{1}{2}W$ isn't positive definite. Heuristically, we can expect $D$ and $D G^\frac{1}{2} W$ to converge to the desirable solution (i.e., the solution such that $D_1G_1^\frac{1}{2}W_1 >0$) because our starting point has that $D_0 G_0^\frac{1}{2} W_0>0$ and is, hence, likely to be ``closer'' to our starting point; the metric being given by the Hilbert-Schmidt norm.}. The sequence of steps are the same as laid out in \cite{Singal}. This method is much simpler to implement compared to the Taylor series example and has a computational complexity of $n^6$. \subsection{Barrier Type Interior Point Method (SDP)} \label{SDP} In \cite{Singal} we showed how the barrier-type interior point method has a computational complexity of $n^8$. We will summarize in brief how this barrier-type interior point method works. This is an iterative algorithm just like the Newton-Raphson method. In fact, the barrier type interior point method comprises of implementing the Newton-Raphson method to obtain the stationary point of the quantity being minimized which is the the quantity $Tr \left( Z \right) - \sum_{i=1}^{m}w_i^{(0)} Log \left( Det \left( Z - p_i \rho_i \right) \right)$. The weights $w_i^{(0)}$ have a very small value, so that the objective function varies by very little from the function $Tr \left( Z \right)$. The reason the term $\sum_{i=1}^{m}w_i^{(0)} Log \left( Det \left( Z - p_i \rho_i \right) \right)$ is added to the function $Tr \left( Z \right) $ is to ensure that if we start from a feasible point (a point where $Z^{(0)} - p_i \rho_i \geq 0, \; \forall \; 1 \leq i \leq m$), our second iterate $Z^{(1)}$ will necessarily remain in the feasible region. This happens because the term $\sum_{i=1}^{m}w_i^{(0)} Log \left( Det \left( Z - p_i \rho_i \right) \right)$ blows up to infinity if any of the operators $ Z - p_i \rho_i$ approaches the boundary of the positive convex set, i.e., if the eigenvalue(s) of any one of these operators approaches 0; the directional derivative would be such that the next iterate for $Z$ would remain in the feasible region. Computing the directional derivative involes computing an $n^2 \times n^2$ square matrix whose computational cost is $n^8$. Thus the computational cost of the barrier-type interior point method is $n^8$. \textbf{ The Taylor series method and Newton-Raphson method mentioned in sections \eqref{Taylor} and \eqref{Newton} have lower computational complexity and are simpler to implement thus giving an edge over the SDP method mentioned above. } \section{Conclusion} We look back over what has been done in this paper: first, the necessary and sufficient conditions for obtaining the optimal POVM for the MED for an ensembles of linearly independent states was simplified. Using the simplified conditions we proved that there exists a bijective function $\mathscr{R}$ which when acted upon any such ensemble gives another ensemble whose PGM is the optimal POVM of for the MED of the pre-image. We also obtained a closed form expression for $\mathscr{R}^{-1}$. This is a generalization of a similar result that was hitherto only proved for linearly independent pure state ensemble in \cite{Bela, Mas, Carlos}. The result also gives a rotationally invariant form of representing the necessary and sufficient conditions for the MED of an ensemble of LI states. This rotationally invariant form for the necessary and sufficient conditions of the optimal POVM is employed for two purposes: 1.) we use it to show that for every LI mixed state ensemble there exists a corresponding pure state decomposition so that the optimal POVM for the MED of the latter is a pure state decomposition for the MED of the former. This is then employed to show under what conditions the optimal POVM of a mixed state ensemble is given by its own PGM. 2.) We employ this rotationally invariant form of the necessary and sufficient conditions in a technique which gives us the optimal POVM for an ensemble. Our technique is compared to a standard SDP technique; that of a barrier-type interior point method. It is found that along with the advantage of our technique being simpler to implement, our technique has a lower computational complexity compared to the barrier-type IPM; our technique has a computational complexity of $n^6$ whereas the computational complexity of the latter SDP technique is $n^8$, which gives our technique an edge over the SDP technique.
{ "redpajama_set_name": "RedPajamaArXiv" }
8,199
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." --> <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> <head> <title>Debugging with GDB: Searching</title> <meta name="description" content="Debugging with GDB: Searching"> <meta name="keywords" content="Debugging with GDB: Searching"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Readline-Interaction.html#Readline-Interaction" rel="up" title="Readline Interaction"> <link href="Readline-Init-File.html#Readline-Init-File" rel="next" title="Readline Init File"> <link href="Readline-Arguments.html#Readline-Arguments" rel="prev" title="Readline Arguments"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} blockquote.smallquotation {font-size: smaller} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} div.indentedblock {margin-left: 3.2em} div.lisp {margin-left: 3.2em} div.smalldisplay {margin-left: 3.2em} div.smallexample {margin-left: 3.2em} div.smallindentedblock {margin-left: 3.2em; font-size: smaller} div.smalllisp {margin-left: 3.2em} kbd {font-style:oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} span.nocodebreak {white-space:nowrap} span.nolinebreak {white-space:nowrap} span.roman {font-family:serif; font-weight:normal} span.sansserif {font-family:sans-serif; font-weight:normal} ul.no-bullet {list-style: none} --> </style> </head> <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <a name="Searching"></a> <div class="header"> <p> Previous: <a href="Readline-Arguments.html#Readline-Arguments" accesskey="p" rel="prev">Readline Arguments</a>, Up: <a href="Readline-Interaction.html#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Searching-for-Commands-in-the-History"></a> <h4 class="subsection">32.2.5 Searching for Commands in the History</h4> <p>Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: <em>incremental</em> and <em>non-incremental</em>. </p> <p>Incremental searches begin before the user has finished typing the search string. As each character of the search string is typed, Readline displays the next entry from the history matching the string typed so far. An incremental search requires only as many characters as needed to find the desired history entry. To search backward in the history for a particular string, type <kbd>C-r</kbd>. Typing <kbd>C-s</kbd> searches forward through the history. The characters present in the value of the <code>isearch-terminators</code> variable are used to terminate an incremental search. If that variable has not been assigned a value, the <tt class="key">ESC</tt> and <kbd>C-J</kbd> characters will terminate an incremental search. <kbd>C-g</kbd> will abort an incremental search and restore the original line. When the search is terminated, the history entry containing the search string becomes the current line. </p> <p>To find other matching entries in the history list, type <kbd>C-r</kbd> or <kbd>C-s</kbd> as appropriate. This will search backward or forward in the history for the next entry matching the search string typed so far. Any other key sequence bound to a Readline command will terminate the search and execute that command. For instance, a <tt class="key">RET</tt> will terminate the search and accept the line, thereby executing the command from the history list. A movement command will terminate the search, make the last line found the current line, and begin editing. </p> <p>Readline remembers the last incremental search string. If two <kbd>C-r</kbd>s are typed without any intervening characters defining a new search string, any remembered search string is used. </p> <p>Non-incremental searches read the entire search string before starting to search for matching history lines. The search string may be typed by the user or be part of the contents of the current line. </p> <hr> <div class="header"> <p> Previous: <a href="Readline-Arguments.html#Readline-Arguments" accesskey="p" rel="prev">Readline Arguments</a>, Up: <a href="Readline-Interaction.html#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> </div> </body> </html>
{ "redpajama_set_name": "RedPajamaGithub" }
2,310
Biografia Nato da famiglia greca crebbe a Chicago e presso la Università di Chicago ottenne il diploma nel 1936 e il dottorato in fisica sperimentale nel 1941 Da Chicago, dove collaborava con Enrico Fermi ed Edward Teller sul Chicago Pile-1, fu poi reclutato da Robert Oppenheimer nell'aprile del 1943 per il Los Alamos National Laboratory e divenne una delle menti più originali del progetto Manhattan. Dopo la seconda guerra mondiale tornò a Chicago come assistente professore. In seguito, nel 1948, fu capo della "Theoretical Division" (T-Division) che al Los Alamos National Laboratory creò il computer MANIAC I nel 1952 e, cinque anni più tardi, MANIAC II. Metropolis ritornò all'Università di Chicago nell'anno 1957 come professore di fisica, fondò e fu capo dell'istituto per la ricerca sui computer, ma ritornò a Los Alamos nel 1965. Il suo nome è legato ai contributi sul metodo Monte Carlo e nel campo delle equazioni integro-differenziali. Il codice che divenne famoso come metodo Monte Carlo ebbe origine da una sintesi di principi che Metropolis derivò da applicazioni più generali in collaborazione con Stanislaw Ulam nel 1949. Un team guidato da Metropolis, di cui faceva parte anche Anthony L. Turkevich di Chicago, nel 1948 condusse il primo calcolo col metodo Monte Carlo tramite il computer ENIAC (il primo computer digitale, costruito nell'Università della Pennsylvania). Metropolis attribuì il germe del suo metodo statistico a Enrico Fermi, che aveva usato queste idee quindici anni prima senza pubblicare nulla a proposito. L'algoritmo di Metropolis fu da lui descritto per la prima volta nel 1953, insieme a A. Rosenbluth, M. Rosenbluth, A. Teller ed E. Teller. e poi citato nella rivista 'Computing in Science and Engineering' come uno dei dieci algoritmi più influenti nello sviluppo della scienza e dell'ingegneria del ventesimo secolo. Lo scienziato amava creare nomi originali per le scoperte. Per esempio, quando Emilio Segrè gli chiese di suggerirgli i nomi di due nuovi elementi egli propose "technetium" (dal greco 'technetos' che significa artificiale) per l'elemento 43 e "astatine" (dal greco 'astatos' che significa instabile) per l'elemento 85, che sono i nomi attualmente usati in inglese rispettivamente per il tecnezio e l'astato. Nick Metropolis ha avuto anche una parte cinematografica in Mariti e mogli, un film diretto da Woody Allen del 1992, nel quale interpretava la figura di uno scienziato in televisione. Bibliografia N. Metropolis, A. N. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equation of state calculation by fast computing machines. Journal of Chemical Physics, 21(6):1087–1092, 1953. Voci correlate Algoritmo di Metropolis-Hastings Altri progetti Collegamenti esterni Nick Metropolis dead at 84, Los Alamos National Laboratory Daily News Bulletin, 19 ottobre 1999. Metropolis, Nicholas Constantine (1915-1999) (at Eric Weisstein's World of Biography) Nicolas Metropolis, The Beginning of the Monte Carlo Method, Los Alamos Science, No. 15, Page 125. Francis Harlow and Nicolas Metropolis, Computing and Computers -- Weapons Simulation Leads to the Computer Era, Los Alamos Science No. 7, Page 132. Herbert Anderson, Metropolis, Monte Carlo and the MANIAC, Los Alamos Science No. 14, Page 69. Metropolis, Nicholas Constantine Metropolis, Nicholas Constantine Statistica computazionale
{ "redpajama_set_name": "RedPajamaWikipedia" }
5,226
Adjusting to change is hard work By Julie Sternberg & Matthew Cordell Review by Megan Florentine "I had a bad August. A very bad August. As bad as pickle juice on a cookie." So says soon-to-be-third-grader Eleanor Kane. What's wrong? Well, for starters, her beloved babysitter, Bibi, is moving away. Eleanor can't imagine her life without the woman who has always cared for her. As Eleanor says when she hears the news, "It was as bad as somebody dying." Eleanor doesn't want to do anything that reminds her about the times she and Bibi spent together. Unfortunately, because she and Bibi did so much, there really isn't anything left for Eleanor to do. Told in poignant first-person narrative, Like Pickle Juice on a Cookie reveals Eleanor's touchy reaction as a new babysitter enters her life. Natalie, the new babysitter, is very different from Bibi. Like a typical eight-year-old, Eleanor is resentful and suspicious of a world where everything is not as it always has been. Like Pickle Juice on a Cookie follows Eleanor, her parents and Natalie as they navigate this tough time. First-time author Julie Sternberg paints Eleanor as a realistic character with her frequent mood swings, tentative hopes for the future and deep desire to cling to the past. Although it's a subject most everyone can relate to, there are few books written about young children and their babysitters. This heartwarming novel and its winsome cartoon-like illustrations draw readers right into the story. Children would enjoy this short chapter book as an independent read, but it would also be a particularly good choice for parents to read to or with their children. Like Pickle Juice on a Cookie
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
1,183
{"url":"https:\/\/stats.stackexchange.com\/questions\/361083\/reading-the-summary-model-from-a-glm-logistic-regression-in-r?noredirect=1","text":"Reading the summary model from a glm logistic regression in R\n\nI'm learning how to do logistic regression and I have some questions about verifying the model based on output in R. First below you can see the results from AIC analysis that chose the model with just Storage as the predictor to be the most appropriate.\n\nNext We have the model summary of this candidate model.\n\nSo my question here is, I'm looking at the p-value for the intercept and it looks like it is not significant. Is it important for the intercept to be significant given that often it has no meaning in the context of the problem? I.e. is this model invalidated by the insignificant y-intercept? Also, because it is logistic regression I think I have vaguely read that these p-values are not really used in logistic regression. So how about the scenario in which a simple linear regression has an insignificant y-intercept? Is that important?\n\nAlso look at the Residual Deviance. It is over dispersive I believe, at 5.173> 4 df. Now what should I do? Disregard the model, even though AIC said this is the best one?\n\nNext is anova\n\nIs there anything i should take away from this read out? Thanks.\n\n$P$-values in GLMs\n\nUsing $p$-values for GLMs isn't a problem per se, as long as your model assumptions hold.$^*$ However, you have first selected the 'best' model based on AICc, so the $p$-value of Storage in the resulting model has lost its meaning (you already chose this model based on significance of this predictor, so the $p$-value is biased). You would be better off reporting the $p$-value of Storage in the original model, including all other predictors. In fact, if your goal is to report on the significance\/effect sizes of these predictors, then there is no need for model selection, you could already do that with your full model.\n\n$^*$: And as with any significance test, note that it is always better to include effect sizes rather than reporting $p$-values alone.\n\nSignificance of the intercept\n\nThis only tells you whether the linear part of the GLM crosses the y-axis significantly far away from $y = 0$.$^{**}$ Unless this is somehow important to your research question, you can usually ignore this test altogether. It certainly does not invalidate your model somehow.\n\n$^{**}$: Or more correctly, $\\eta = 0$, the linear part of the GLM.\n\nOverdispersion\n\nIt is good that you consider the size of residual deviance ($5.173$) compared to the residual d.f. ($4$) However, I would say that these are actually quite close to each other and the $\\chi^2$-statistic for overdispersion would be very low. As a rule of thumb, consider whether these two numbers are more or less in the same order of magnitude. If one is twice, or tens times as large as the other, your $p$-values are more reliable using a quasi-binomial distribution.\n\nSignificance in general\n\nMost important, I think you should focus less on significance. Significance of the intercept is not important, insignificance is no reason for model selection and significance of the predictors by itself isn't very meaningful to begin with.\n\nI recommend having a look at some of the Q&As here on stepwise regression (selecting variables based on significance) and why this is almost always a bad idea. A good place to start is here and here. You might have been taught in a course to select significant predictors, but this is not a good idea. Just to give you an idea of what to expect, here is a quote from the second linked post:\n\n[A]ll predictors in a model and their posited causal relationship between a single exposure of interest and a single outcome of interest should be specified apriori. [...] Some journals (and the trend is catching on) will summarily reject any article which uses stepwise regression to identify a final model (Babyak, 2004), and I think the problem is seen in similar ways here.\n\n\u2022 That's is a comprehensive response @FransRodenburg, I don't have time to read it all now, but let me read it over the weekend and respond if I have some further questions before I accept the answer. Thanks. \u2013\u00a0Bucephalus Aug 8 '18 at 20:51\n\u2022 Thankyou @FransRodenburg that was very helpful and informative. \u2013\u00a0Bucephalus Aug 10 '18 at 12:06","date":"2020-08-15 11:30:05","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6949382424354553, \"perplexity\": 505.0928785186625}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 5, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2020-34\/segments\/1596439740838.3\/warc\/CC-MAIN-20200815094903-20200815124903-00251.warc.gz\"}"}
null
null
Middle Silver Falls is the general name for a long chain of waterfalls at the end of Dynamite Hill Road. The largest ones, located between Indian and Arvon Road, are surrounded by cabins, complicate access. Here the bedrock thrusts up from under the water, forcing the river down narrow chutes and over steep plunges, creating an incredibly forceful and angry set of drops. Downstream from Arvon Road access is a bit easer, with a single cabin on the west bank that is far above most of the drops. These waterfalls are more subdueded but still very scenic, blocky drops over the tough rock with a few direct plunges. Gomanche Falls is located on the west bank near the downstream falls, just past the cabin. Dynamite Hill Road heads east from US-41 a short distance south of L'Anse, along the long sloped decline near the famous Hilltop Restuarant. Turn down Dynamite Hill Road and follow it for 4.1 miles, bearing left at the final fork after it turns from pavement to dirt (and technically becomes Arvon Road). Park on the far side of Silver River, which passes under the road, near the unmarked gravel road that heads left through a sand pit. This gravel road (aka Dakota Farm Road) is usually gated. Head through the gravel pit for a bit, parallel to the river. Stick to the left side when it opens up. A track will split off from the main road and head up the far left corner of the pit, try to stick to it as it leaves the pit. Continue on the track through the woods bearing left on any forks. After a while the track should peter out, head down to the river. The lowermost falls should be near here. If the river is swampy and winding you've gone too far, if it is straight with steep banks than you haven't gone far enough. Hike upstream from the lowermost drop to view all three of the lower falls. Accessing the upper falls are a bit more difficult. There are three groupings of falls upstream of Arvon Road. .4 miles on Indian Road, after the fork with Arvon Road, there is an overgrown two-track that heads east. This will take you to the first group. From here you can head upstream a few hundred yards to visit the second grouping. To access the third grouping, which happens to have the most private property around it, find the track that is 2 miles from Arvon Road and head north, parking when it gets too rough, and head to the river and follow it upstream. Nancy Haun Sep 9, '18 Thanks for the good directions Jacob-we went there today! Quite a hike down the steep slope but what a reward!
{ "redpajama_set_name": "RedPajamaC4" }
7,884
Q: Writing formatted output to two files at the same time For an assignment I have to write a class that offers the same facilities as ostream, but outputs to two files at the same time. Currently I have the following code (in-class implementations for brevity): #ifndef BISTREAM_H_ #define BISTREAM_H_ #include <iostream> #include <fstream> class BiStream : public std::ostream { std::ofstream d_firstFile; std::ofstream d_secondFile; public: BiStream(std::ofstream& one, std::ofstream& two) : d_firstFile(std::move(one)), d_secondFile(std::move(two)) {} friend BiStream& operator<<(BiStream& out, char const *txt) { out.d_firstFile << txt; out.d_secondFile << txt; return out; } }; #endif Then I can use this in the following way: #include "bistream.h" using namespace std; int main() { ofstream one("one"); ofstream two("two"); BiStream ms(one, two); ms << "Hello World" << endl; // Write to files and flush stream } If I run the resulting program, it correctly prints "Hello World" to both files, but no newline is added to either files. Furthermore, statements like (after including iomanip of course) ms << std::hex << 5 << '\n'; results in no text printed in the files. As a last example: ms << "test" <<"Hello World" << endl; Only prints "test" to the files. This all implies that my overload insertion operator only writes the first argument to the file... What is the best way to approach this problem? The exercise hints at a second class that inherits from std::streambuf, but std::streambuf is something that I don't understand and searching for explanations on the internet hasn't made it any clearer. Thanks!
{ "redpajama_set_name": "RedPajamaStackExchange" }
4,906
{"url":"https:\/\/latex.org\/forum\/viewtopic.php?f=41&t=32731&p=109999","text":"## LaTeX forum \u21d2 New Members \u21d2 Hi everyone - LaTex web development\n\nYou would like to introduce yourself before starting to post? That's a nice idea and here is the forum for you...\nalfaeymars\nPosts: 1\nJoined: Mon Aug 05, 2019 8:54 pm\n\n### Hi everyone - LaTex web development\n\nHi everyone,\nI am new to LaTex but I am helping a mathematics teacher to get his LaTex Math online. He has all of it in LaTex and the markup is beautiful. I am trying to find out what is the best way to display his work without having to rewrite it. So I am here to learn about LaTex, MathJax and testing solutions.","date":"2020-07-12 03:07:24","metadata":"{\"extraction_info\": {\"found_math\": false, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.9881440997123718, \"perplexity\": 1395.5610153245548}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2020-29\/segments\/1593657129517.82\/warc\/CC-MAIN-20200712015556-20200712045556-00455.warc.gz\"}"}
null
null
\section{Introduction} On the way to scalable quantum information processing Majorana fermions (MF) in topological superconductors are a promising candidate for the implementation of quantum bits in solid-state devices \cite{Kitaev2001,Nayak2008}. Since information in such systems is stored and processed in a nonlocal fashion by means of their non-Abelian statistics \cite{Read2000,Ivanov2001}, Majorana-based qubits are immune to local fermionic parity conserving perturbations which impair other qubit realizations. Manipulation of such topologically protected qubits requires braiding of MFs, which is well-defined only in two dimensions. However, different schemes have been proposed \cite{Fu2008,Alicea2011,Flensberg2011,Romito2012} to enable braiding of MF in one dimensional systems. Several suggestions for one-dimensional physical realizations that host Majorana bound states (MBS) have been made. These suggestions are based on conventional superconductors in proximity to various systems including a topological insulator edge \cite{Fu2008}, semiconductor wires in a magnetic field \cite{Lutchyn2010,Oreg2010}, and half metals \cite{Duckheim2011,Chung2011}. Recently, more realistic investigations have elucidat\-ed the effects of interactions and disorder. In general interactions \cite{Gangadharaiah2011,Sela2011,Stoudenmire2011} or disorder with short range cor\-relations \cite{Motrunich2001,Potter2010,Potter2011a,Potter2011b,Brouwer2011,Brouwer2011a,Stanescu2011} can greatly affect the range of parameters in which the system supports topological boundary states or even cause the topological phase to break down completely if the interaction \cite{Gangadharaiah2011} or disorder \cite{Motrunich2001} strength exceed certain critical values. Long-range correlated disorder in a topological superconductor creates nontopological domains with MF localized at the domain walls \cite{Flensberg2010,Shivamoggi2010,Lutchyn2011}. Several proposals have been put forward to access MFs experimentally based on interferometry \cite{Fu2009a,Hassler2010} or transport properties such as tunneling conductance peak \cite{Law2009,Flensberg2010,Leijnse2011}, half-integer conductance plateaus \cite{Wimmer2011}, or signatures in the shot noise \cite{Bolech2007,Akhmerov2011}. Recent experiments have reported possible signatures of Majorana bound states in the differential tunneling conductance of semiconductor quantum wires \cite{Mourik2012,Deng2012,Das2012}. A more specific way of detecting MFs is to measure the Josephson current across a weak link between two topological superconductors \cite{Kitaev2001,Fu2009,Oreg2010,Lutchyn2010,Alicea2011} that arises due to a phase difference of the superconducting order parameters. If the weak link is incorporated into a ring made of a conventional superconductor, the current flowing through the junction is a periodic function of flux with period $h/2e$ (corresponding to $2\pi$ periodicity in the phase difference), associated with the transfer of Cooper pairs across the junction. In a ring made of a topological superconductor, there is a MBS on each side of the junction and the tunneling current obtains a component that is $h/e$ periodic \cite{Akhmerov2011} (corresponding to $4\pi$ periodicity in the phase difference). This doubling of the flux period with respect to the ordinary Josephson effect originates from single-electron tunneling mediated by the MBS and is dubbed fractional Josephson effect. The $h/e$-periodic Josephson current is observed as long as the fermion number parity of the system is conserved. Once the system is in strict thermodynamic equilibrium, including relaxation processes which change fermion parity, the Josephson current reverts to the conventional $h/2e$ periodicity. Indeed, the $h/e$-periodic Josephson current has equal magnitude but opposite signs for even and odd fermion parities, so that it averages to zero in the presence of fermion-parity changing processes. Possible workarounds that do not require strict parity conservation rely on the $ac$ Josephson effect \cite{Kwon2004,Jiang2011}, or finite-frequency current noise \cite{Badiane2011}. Experimental signatures of a fractional Josephson effect in Shapiro step measurements have been claimed recently \cite{Rokhinson2012}. Here we show that in mesoscopic rings with a weak link, the presence of Majorana fermions can lead to an $h/e$-periodic Josephson current even in thermodynamic equilibrium and in the presence of fermion-parity-breaking relaxation processes. This $h/e$-periodic contribution exists in the topological superconducting phase and peaks in magnitude near the topological phase transition, providing an experimental signature of the phase transition. We investigate this signature for a spinless $p$-wave superconductor wire, the Kitaev chain \cite{Motrunich2001,Kitaev2001}. which is a paradigmatic model exhibiting a topological phase transition. This model also arises as an effective low-energy theory in more realistic situations such as the quantum-wire proposals of Refs.~\onlinecite{Lutchyn2010} and \onlinecite{Oreg2010}. In a ring geometry, the Majorana bound states hybridize not only due to the tunneling across the weak link but also through the superconducting interior of the ring. The latter overlap is exponentially small in the ratio of the ring circumference and the superconducting coherence length governing the spatial extent of the Majorana bound states. As one approaches the topological phase transition, the superconducting coherence length diverges and the interior overlap between the Majorana bound states becomes significant. This causes a peak of the $h/e$-periodic Josephson current near the topological phase transition \footnote{1}. After discussing this effect in clean rings, we extend our considerations to disordered rings. We show that the signature of the topological phase transition is robust and survives under more realistic conditions. This issue also leads us to study the influence of disorder in the vicinity of the topological phase transition of the Kitaev chain which had not been discussed previously. Previous work \cite{Motrunich2001,Potter2010,Brouwer2011,Brouwer2011a} on disorder effects in the Kitaev chain or models of quantum wires focused on the regime of large chemical potential (measured from the lower band edge), $\mu \gg m\Delta'^2$, where $\Delta'$ denotes the effective $p$-wave order parameter of the Kitaev chain in the continuum limit. In this regime, the topological region in the phase diagram shrinks with increasing disorder \cite{Brouwer2011}. In contrast, the topological phase transition in the Kitaev chain occurs for $\mu=0$ and thus in the opposite regime of $\mu\ll m\Delta'^2$. Remarkably, we find that in this regime disorder {\em increases} the topological region in the phase diagram. This paper is organized as follows. In Section \ref{sec:model} we review the Kitaev model for a one-dimensional spinless $p$-wave superconductor and its various regimes. We also discuss how this model is related to quantum-wire based realizations, focusing on the modelling of the magnetic flux through a quantum wire ring in proximity to a bulk superconductor. Section \ref{sec:signatures} is dedicated to the flux-periodic Josephson currents in clean rings, focusing on the flux-periodicity as a signature of the topological phase transition. The basic effect is discussed in Sec.~\ref{sec:finite_ring}, analytical considerations on the magnitude of the effect are given in Sec.~\ref{sec:low_energy_model}, and a comparison with numerical results is given in Sec.~\ref{sec:numerics}. Sec.~\ref{sec:disorder} extends the considerations to disordered rings. Besides a discussion of the effects of disorder on the Josephson currents, we also study the phase diagram of the disordered wire near the topological phase transition. \section{Model}\label{sec:model} \subsection{Kitaev model of a one-dimensional spinless $p$-wave superconductor} \label{sec:kitaev_basics} Our analysis starts with the Kitaev model of a one-dimensional spinless $p$-wave superconductor \cite{Kitaev2001,Motrunich2001} \begin{align} H_{\rm TB}&=-\mu_{\rm TB} \sum_{j=1}^N c^\dagger_j c_j\nonumber\\ &-\sum_{j=1}^{N-1} (t c_j^\dagger c_{j+1}+\Delta_{\rm TB} c_jc_{j+1}+\mathrm{h.c.}), \label{Kitaev_TB_Hamiltonian} \end{align} which describes a wire of $N$ sites. Electrons on site $j$ are annihilated by $c_j$, hop between neighboring sites with hopping amplitude $t$, and have chemical potential $\mu_\mathrm{TB}$. For all numerical calculations in this paper we choose $t=1$. The $p$-wave pairing strength is given by $\Delta_\mathrm{TB}$. Here, we label both the chemical potential and the pairing strength by the subscript TB to distinguish these parameters of the tight-binding model (\ref{Kitaev_TB_Hamiltonian}) from their analogs in the continuum model introduced below. The wire can be closed into a ring with a weak link by an additional hopping term between sites $1$ and $N$, \begin{align} H_{\rm T}=-t' c_N^\dagger c_1 + \mathrm{h.c.}, \label{Kitaev_TB_tunneling_Hamiltonian} \end{align} with hopping amplitude $t'$. We assume that charging effects are weak and can be neglected (see Refs.~\onlinecite{Heck2011,Zocher2011} for consequences of charging in ring-like structures). For an infinite and uniform wire, the Kitaev Hamiltonian (\ref{Kitaev_TB_Hamiltonian}) exhibits a phase transition when the chemical potential $\mu_\mathrm{TB}$ crosses one of the band edges. The system is in a topological (nontopological) superconducting phase when the chemical potential is within (outside) the interval $[-2t,2t]$, i.e., within (outside) the band at vanishing pairing $\Delta_{\mathrm{TB}}=0$. The spectrum exhibits a superconducting gap on both sides of the topological phase transition while the gap closes at the topological critical points $|\mu_\mathrm{TB}| = 2t$. It is thus natural to introduce the chemical potential measured from the lower band edge, i.e., $\mu=\mu_{\mathrm{TB}}+2t$. In the vicinity of the band edges (say the lower band edge) and thus of the topological phase transition, we can make a continuum approximation to the tight-binding model (\ref{Kitaev_TB_Hamiltonian}). We will mostly employ the tight-binding model in the first part of the manuscript, while we partially find it more convenient to rely on the continuum approximation in dealing with effects of disorder in Sec.~\ref{sec:disorder}. The continuum model is formulated in terms of the corresponding Bogoliubov--de Gennes Hamiltonian \cite{Motrunich2001,Kitaev2001} \begin{align} H=\begin{bmatrix} \frac{p^2}{2m}+V(x)-\mu & \frac{1}{2}\left\lbrace\Delta'(x) ,p\right\rbrace\\ \frac{1}{2}\left\lbrace\Delta'(x),p\right\rbrace& -\left(\frac{p^2}{2m}+V(x)-\mu\right) \end{bmatrix} \label{Kitaev_hamiltonian} \end{align} where $\Delta'(x)$ is the $p$-wave pairing strength and the curly brackets denote the anticommutator. Here, we have included a disorder potential $V(x)$ which we will return to in more detail in Sec.~\ref{sec:disorder}. For $V(x)=0 $ the bulk spectrum of the continuum model is given by \begin{align} \epsilon_p=\pm\left[ \left(\frac{p^2}{2m}-\mu\right)^2+|\Delta'|^2 p^2\right]^{1/2} , \label{Kitaev_spectrum} \end{align} which becomes gapless for $\mu=0$. This indicates the above-mentioned topological phase transition between a topological phase with $\mu>0$ and a nontopological phase for $\mu<0$. \begin{figure}[t!] \begin{center} \includegraphics[width=.23\textwidth]{spec_largemu.pdf} \includegraphics[width=.23\textwidth]{spec_smallmu.pdf} \end{center} \caption{(Color online) Bulk spectrum Eq.~(\ref{Kitaev_spectrum}) of Kitaev's model for a spinless $p$-wave superconductor in the regimes (a) $\mu\gg m\Delta'^2$ and (b) $0<\mu\ll m\Delta'^2$.} \label{fig:spectrum} \end{figure} In a semi-infinite wire, the topological phase is characterized by a Majorana bound state localized near its end point. The Majorana bound state has zero energy and a wave function that decays exponentially into the wire on the scale of the superconducting coherence length $\xi$. In a finite wire, the Majorana bound states localized at the two ends of the wire hybridize and form a conventional Dirac fermion whose energy $\epsilon_0$ scales like the overlap of the two Majorana end states which is exponentially small in the length $L$ of the wire. The wavefunction of the Majorana bound state depends on the parameter regime (see, e.g., Ref.~\onlinecite{Halperin2012}). This is easily seen by determining the allowed wavevectors at zero energy from Eq.~(\ref{Kitaev_spectrum}), which yields \begin{align} p_0& =\pm im|\Delta'|\pm \sqrt{2m\mu-m^2|\Delta'|^2}.\label{MBS_wavevector} \end{align} (i) $\mu\gg m\Delta'^2$: Deep in the topological phase, the bulk excitation spectrum Eq.~(\ref{Kitaev_spectrum}) has two minima around $\pm p_F=\pm\sqrt{2m\mu}$ with a gap $\Delta_{\rm eff}^{(i)}\approx p_F\Delta'$ (see Fig.~\ref{fig:spectrum}a). According to Eq.~(\ref{MBS_wavevector}), the Majorana wavefunctions decay on the scale $\xi=1/m\Delta'$ and oscillate with a much shorter period $1/p_F$. In a finite wire the hybridization energy is given by (cf.\ appendix~\ref{appendice}) $\epsilon_0= 2\Delta'p_F|\sin(p_F L)|\exp(-L/\xi)$, which has accidental degeneracies at integer values of $p_FL/ \pi$. (ii) $\mu\ll m\Delta'^2$: Near the topological phase transition at $\mu=0$, the excitation spectrum has only a single minimum at $p=0$ with a gap of order $\mu$ (see Fig.~\ref{fig:spectrum}b). At low energies, we can neglect the kinetic energy in Eq.~(\ref{Kitaev_hamiltonian}) and the spinless $p$-wave superconductor can be approximately described by the Dirac Hamiltonian \begin{align} H\simeq -\mu\tau_z+\Delta' p\tau_x. \label{Dirac_Hamiltonian} \end{align} Eq.~(\ref{MBS_wavevector}) gives $p_0\approx \pm i\mu/\Delta'$, so that the spatial extent of the Majorana wavefunction is governed by the coherence length $\xi=\Delta'/\mu$, which diverges at the topological phase transition. In contrast to the previous regime, the end-state energy does not exhibit oscillations, $\epsilon_0 \propto \exp(-L/\xi)$. \subsection{Magnetic flux}\label{sec:magnetic_flux} \begin{figure}[t!] \begin{center} \includegraphics[width=0.48\textwidth]{rings.pdf} \end{center} \caption{(Color online) Two possible setups for a quantum wire with a tunneling junction in proximity to an $s$-wave superconductor. (a) The bulk superconductor is interrupted by an insulating region underneath the weak link in the wire. (b) The bulk superconductor forms a continuous ring and only the wire contains a weak link.} \label{fig:setup} \end{figure} In the presence of a magnetic flux threading the ring, both the tunneling amplitude and the pairing strength become complex and acquire a phase. The precise nature of these phases depends on the physical realization of the Kitaev chain. We illustrate this point by discussing two possible setups based on the proposal to realize the Kitaev chain in a semiconductor wire proximity coupled to an $s$-wave superconductor \cite{Lutchyn2010,Oreg2010}, as illustrated in Fig.~\ref{fig:setup}: \begin{enumerate} \item[(a)] The $s$-wave superconductor is interrupted underneath the weak link in the quantum wire. Current can flow around the loop only through the semiconductor weak link. \item[(b)] The $s$-wave superconductor forms a closed ring and a weak link exists only in the semiconductor wire. The current through the weak link of the semiconductor will in general be only a small perturbation of the current flowing through the superconductor. \end{enumerate} We assume that the thickness of the superconducting ring is small compared to both its London penetration depth and its superconducting coherence length $\xi_{\mathrm{SC}}$. The supercurrent flowing in the superconductor is given by \cite{Tinkham1975} \begin{align} J_s=\frac{2e}{m^*}|\psi|^2\left(\hbar\nabla\varphi-2 eA\right),\label{supercurrent} \end{align} where $m^*$ and $|\psi|^2$ are the effective mass and density of the superconducting electrons and $\varphi$ denotes the phase of the $s$-wave order parameter. The $p$-wave pairing potential in the quantum wire inherits its phase $\varphi$ from the $s$-wave superconductor underneath via the proximity effect. (The effective $p$-wave order parameter may have an additional phase shift that depends on geometric details such as the direction of the Zeeman field and the spin-orbit coupling; however, these contributions lead to constant offsets of the phase which are unaffected by the magnetic flux.) The vector potential ${\bf A}$ oriented along the wire is related to the Aharonov--Bohm flux $\phi$ through \begin{align} \phi=\oint\mathrm{d}x A(x)\label{stokes_theorem}, \end{align} where the integral is taken around the ring of circumference $L$. The phase of the order parameter $\varphi$ is different for the two setups illustrated in Fig.~\ref{fig:setup}. In setup (a), no supercurrent is able to flow since the loop is interrupted, $J_s=0$. If we choose a gauge in which the vector potential is uniform around the ring, $A(x) = \phi/L$, the phase $\varphi$ of the order parameter becomes $\varphi (x) = 4\pi(\phi/\phi_0)(x/L)$ in terms of the normal-metal flux quantum $\phi_0 = h/e$. In setup (b), the supercurrent around the ring is governed by fluxoid quantization $\varphi (x+L) = \varphi(x) + 2\pi n$, with the integer $n$ labeling the fluxoid states. In a gauge in which $A(x)=\phi/L$, this implies that $\nabla \varphi = 2\pi n/L$, yielding a supercurrent of $J_s = (2e/m^*)|\psi|^2 [2\pi \hbar n/L - 2e A]$. Here, $[x]$ denotes the integer closest to $x$. In thermodynamic equilibrium, the system realizes the fluxoid state of lowest energy and thus of lowest supercurrent, i.e., $n=[\phi/(\phi_0/2)]$. Within the chosen gauge, in setup (a) the hopping amplitude and the pair potential in the tight binding Hamiltonian in Eq.\ (\ref{Kitaev_TB_Hamiltonian}) take the form $t \to t e^{i 2\pi \phi/N\phi_0}$ and $\Delta_\mathrm{TB} \to \Delta_\mathrm{TB}e^{i 4\pi (\phi/\phi_0) (j/N)}$. Alternatively one can perform the gauge transformation $c_j \to c_j e^{-i(j-1/2) 2 \pi \phi/N \phi_0}$ which eliminates the phase from the pair potential. In this new gauge, both the pair potential and the hopping amplitude $t$ in the interior of the ring are real while the hopping amplitude across the weak link acquires a phase factor, $t^\prime \to t^\prime e^{i2\pi \phi/\phi_0}$. Our numerical results will be obtained for this representation of the tight-binding model. In contrast, in setup (b), we find $\Delta_\mathrm{TB} \to \Delta_\mathrm{TB}e^{i 2\pi [\phi/(\phi_0/2)] (j/N) }$ for the pair potential (notice the closest integer symbol $[.]$ in the exponent), while $t \to t e^{i 2\pi \phi/N\phi_0}$ as well as $t^\prime \to t^\prime e^{i 2\pi \phi/N\phi_0}$. As in the previous case (a), we can eliminate the phase of the pair potential by a gauge transformation. However, this no longer eliminates the phase of the hopping matrix element $t$. Instead, one finds $t \to t e^{i (\pi/N) \{ \phi/(\phi_0/2) - [\phi/(\phi_0/2)] \} }$ and $t^\prime \to t^\prime e^{i (\pi/N) \{ \phi/(\phi_0/2) +(N-1) [\phi/(\phi_0/2)]\} }$. The fact that we can no longer eliminate the magnetic flux from the bulk of the wire is a manifestation of the fact that supercurrents in the $s$-wave superconductor modify the spectrum of the quantum wire \cite{Romito2012}. Clearly, the effective Kitaev chain is quite different for setups (a) and (b). In the remainder of this paper, we will focus on setup (a) where the flux enters only into the tunneling Hamiltonian representing the weak link. In this setting, the current in the semiconductor wire of interest here is experimentally more accessible since there is no background current in the bulk $s$-wave superconductor unlike in setup (b). \section{Clean rings}\label{sec:signatures} \subsection{Infinite wire} We first briefly review the Josephson effect of two semi-infinite wires connected at their ends through a weak link (or equivalently, a ring of infinite circumference), as originally considered by Kitaev \cite{Kitaev2001}. The corresponding low-energy excitation spectrum as a function of flux is sketched in Fig.~\ref{fig:flux}a. Due to the Majorana end states, there are two subgap states whose energies are governed by the tunneling amplitude across the weak link. While each individual level is periodic in flux with period $h/e$, the overall spectrum is $h/2e$ periodic. As a result, the thermodynamic ground state energy of the system -- and thus the Josephson current in strict thermodynamic equilibrium -- are $h/2e$ periodic. At the same time, the $h/e$ periodicity of the individual subgap states is a direct consequence of the Majorana nature of the endstates. This signature of Majorana fermions can be brought out in measurements of the Josephson current if the fermion parity of the system is a good quantum number. The level crossing of the two Majorana subgap states in Fig.~\ref{fig:flux}a is then protected by fermion parity conservation. As a result, since there is only a single level crossing per superconducting flux quantum, the system necessarily goes from the ground state to an excited state (or vice versa) when changing the flux by $h/2e$. During this process, the excited state is unable to relax to the ground state since this would require a change in fermion parity. Thus, the system only returns to its initial state after a change in flux of $h/e$, which corresponds to the fractional Josephson effect. \subsection{Finite size ring}\label{sec:finite_ring} \begin{figure}[t!] \includegraphics[width=.24\textwidth]{MBS_flux.pdf} \includegraphics[width=.23\textwidth]{fourier_emerge.pdf} \caption{(Color online) (a) Typical Bogoliubov--de Gennes spectrum as a function of phase difference across the junction between two semi-infinite wires in the topological phase with the tunneling amplitude $\Gamma$ and the gap $\Delta_{\rm eff}$. The two low-energy Majorana states represented by the dashed and solid lines are related by particle-hole symmetry. The continuum of states outside the gap is displayed in gray. The thermodynamic ground state has period $h/2e$. (b) Numerical results for the subgap spectrum of a mesoscopic ring with finite circumference for $\Delta=1$, $\mu=-1.8$, $t'=0.01$. We set $t=1$ for all numerical calculations in this paper. The parameters correspond to $\xi=9.5$ and the different curves display data for ring circumferences $L=95,52,38$ all in units of the lattice spacing. As the circumference of the wire decreases the overlap through the topological superconductor in Eq.~(\ref{low_energy_Hamiltonian}) increases. Note that the equilibrium ground state always has $h/e$ periodicity in rings of finite circumference.} \label{fig:flux} \end{figure} For rings with finite circumference, the two Majorana bound states localized at the two banks of the weak link hybridize not only through the tunnel coupling across the weak link but also because of the overlap of their wavefunctions in the topological superconductor. In the previous subsection, we considered the situation in which this interior hybridization is vanishingly small compared to tunneling across the weak link. Conversely, when tunneling across the weak link is negligible compared to the interior hybridization, the splitting of the Majoranas due to the interior overlap does not depend on flux. Weak tunneling across the junction will then cause a small $h/e$-periodic modulation of the split Majorana levels with flux. In this situation, even the {\em thermodynamic} ground state energy becomes $h/e$ periodic, regardless of the presence or absence of fermion parity violating processes. In fact, of the two $h/e$-periodic levels, the negative-energy level (which is occupied in equilibrium) corresponds to an even-parity ground state while the positive-energy level is occupied in the odd-parity first excited state. Weak fermion parity violating processes will not destroy the $h/e$-periodic Josephson current as the two levels no longer cross as function of flux. The full crossover of the Bogoliubov--de Gennes spectrum as the interior overlap of the Majorana bound states increases is illustrated with numerical results in Fig.~\ref{fig:flux}b (see Sec.~\ref{sec:numerics} for details on the numerical calculations). They confirm the above picture for the limit of strong overlap. But they also show that an $h/e$-periodic contribution to the equilibrium Josephson current exists even when the interior splitting is of the order of or smaller than the tunnel coupling across the weak link. Indeed, the interior overlap essentially pushes one of the two states (dashed line) up in energy, while it pushes its particle-hole conjugate state (solid line) down. At small interior overlaps, this shifts the two level crossings (initially at $\phi_0/4$ and $3\phi_0/4$) outwards towards a flux of zero and one flux quantum $\phi_0$. Note that the level crossings remain intact, protected by fermion parity conservation. However, once the level crossings reach a flux of zero and $\phi_0$, respectively, the levels merely touch at these points. Thus, fermion parity no longer protects the levels from splitting, and indeed one state remains at finite and negative energies at all values of flux while, symmetrically, its particle-hole conjugate state remains at finite and positive energies. Consider now the Josephson current as function of flux in the presence of weak but finite fermion parity violating processes. Specifically, we assume that the flux is varied by $h/e$ on a time scale which is large compared to the relaxation time of the fermion parity while at the same time, the fermion parity violating processes are weak compared to the hybridization of the Majorana bound states so that the Bogoliubov-de Gennes spectra in Fig.~\ref{fig:flux} are relevant. In this case, the Josephson current is essentially $h/2e$ periodic deep in the topological phase, where $L\gg \xi$. However, as the system approaches the topological phase transition, $\xi$ grows and hence, the hybridization of the Majorana bound states through the interior of the ring increases. As a result, the $h/e$-periodic contribution to the current increases. Conversely, the Majorana bound states disappear on the nontopological side of the phase transition where the Josephson current thus reverts to $h/2e$ periodicity. As a result, we expect a {\em peak} in the $h/e$-periodic Josephson current near the topological phase transition, whose measurement would constitute a clear signature of the topological phase transition and the formation of Majorana fermions. This expectation is confirmed by the numerical results shown in Fig.~\ref{fig:fourier_component}a, where the corresponding Fourier coefficient $A_{h/e}=(2e/h)\int_0^{h/e}\mathrm{d}\phi I(\phi)\sin(2\pi e\phi/h)$ of the {\em equilibrium} Josephson current $I (\phi)$ is plotted as a function of chemical potential. $A_{h/e}(\mu)$ exhibits a peak in the topological phase ($\mu>0$), which moves closer to the topological phase transition at $\mu=0$ as the ring circumference increases (see Fig.~\ref{fig:fourier_component}b). Deep in the topological phase the Majorana bound states are localized at the weak link. Approaching the phase transition at $\mu=0$, the MBS delocalize. On the one hand, this causes an increase in the overlap of the MBS in the interior of the topological superconductor. As discussed above, this leads to an increase of the $h/e$-periodic Josephson current. On the other hand, however, the probability density of the Majorana bound state near the weak link decreases, causing a suppression of the hybridization of the Majorana bound states across the weak link and hence of the $h/e$-periodic Josephson current. Thus, the peak occurs for the value of $\mu$ where the interior overlap splitting is equal to the tunnel coupling. Since the interior overlap is exponentially small in $L/\xi$ while the hybridization across the weak link is roughly independent of the ring's circumference $L$, the peak position shifts towards the phase transition point at $\mu=0$ with increasing $L$ (cf.\ Fig.~\ref{fig:fourier_component}c). Since at the same time the $h/e$-periodic Josephson current becomes suppressed when the systems is approaching the phase transition, the peak is more pronounced in shorter rings. \subsection{Low-energy Hamiltonian} \label{sec:low_energy_model} A more quantitative description can be developed by restricting the Hamiltonian to the low-energy subspace spanned by the two Majorana bound states. The pro\-jec\-tion of the tunneling Hamiltonian across the weak link onto this subspace yields \begin{align} H_{\rm T}=-\Gamma\cos(2\pi \phi/\phi_0) (d_{\rm M}^\dagger d_{\rm M}-1/2), \label{effective_tunneling_hamiltonian} \end{align} where $d_M$ is the Dirac fermion constructed from the two Majorana bound states. The parameter $\Gamma$ measures the tunnel coupling of the Majorana bound states across the weak link and is given by (cf.\ Eq.~(\ref{good-for-plots}) in appendix~\ref{appendice}) \begin{align} \Gamma=\frac{ t'\mu (4t-\mu) \Delta_{\mathrm{TB}} }{ t(t+\Delta_{\mathrm{TB}})^2} \label{gamma_mean}. \end{align} Here the factor of $\mu$ accounts for the probability density of the Majorana wavefunction at the junction, which vanishes at the phase transition. The overlap of the Majorana end-states in the interior of the wire leads to an additional coupling (cf.\ appendix~\ref{appendice}) \begin{align*} H_{\mathrm{overlap}}=\epsilon_0 \left(d_M^{\dag} d_M-1/2\right), \end{align*} where \begin{equation} \epsilon_0 =2 \mu \exp(-L/\xi) \label{energy-splitting} \end{equation} measures the strength of the overlap. Combining these two contributions for a mesoscopic ring near the topological phase transition ($\mu\ll m{\Delta^\prime}^2$), the effective low-energy Hamiltonian reads as \begin{align} H_{\rm eff}&=\left[\epsilon_0-\Gamma\cos\left(\frac{2\pi\phi}{\phi_0}\right)\right]\left(d_{\rm M}^\dagger d_{\rm M}-1/2\right).\label{low_energy_Hamiltonian} \end{align} The Bogoliubov--de Gennes spectrum of this Hamiltonian reproduces the numerically calculated subgap spectra depicted in Fig.~\ref{fig:flux}b. \begin{figure}[tp!] \includegraphics[width=.48\textwidth]{fourier_analyt.pdf}\\ \includegraphics[width=.48\textwidth]{fourier.pdf}\\ \includegraphics[width=.48\textwidth]{fourier_length.pdf} \caption{(Color online) (a) Numerical results for the $h/e$-periodic Fourier component of the Josephson current, $A_{h/e}$, as a function of chemical potential in a ring with $\Delta_{\rm TB}=1$ and $L=200$ (blue dots) together with analytical expression Eqs.~(\ref{fourier}) (red solid line). Inset: numerical results for $\epsilon_0$ (blue squares) and $\Gamma$ (red circles) together with the corresponding analytical expressions (gray dashed curves) Eqs.~(\ref{energy-splitting}) and (\ref{gamma_mean}). (b) $h/e$-periodic Fourier component (solid), $h/2e$-periodic Fourier component (dashed), and the maximum tunneling current of the MBS, $e\Gamma/h$. (c) $A_{h/e}$ for different ring circumferences $L$. } \label{fig:fourier_component} \end{figure} In principle, both the negative energy continuum states as well as the negative energy subgap state contribute to the equilibrium Josephson current. If we denote the sum over all negative excitation energies by $E_0(\phi)$, we can write the equilibrium Josephson current as $I(\phi)=-\partial_\phi E_0(\phi)$. However, it is natural to expect and will be coroborated by our numerical results that the Josephson current is dominated by the contribution of the subgap state $I(\phi)\simeq \partial_\phi|\epsilon_0-\Gamma\cos(2\pi\phi/\phi_0)|/2$. Thus, it is straight-forward to compute the $h/e$-periodic Fourier component of the Josephson current, \begin{align} A_{h/e} = \left\lbrace \begin{matrix}\frac{e\Gamma}{\pi \hbar} \left[\frac{\epsilon_0}{\Gamma}\sqrt{1-\frac{\epsilon_0^2}{\Gamma^2}} + \arcsin\left( \frac{\epsilon_0}{\Gamma} \right) \right], & \epsilon_0 <\Gamma \\ \frac{e\Gamma}{2\hbar},& \epsilon_0 >\Gamma\end{matrix} \right. . \label{fourier} \end{align} In the next section, we compare this analytical result with numerics and find nice agreement. \subsection{Numerical Results}\label{sec:numerics} To obtain numerical results for the Josephson current, we solve the Hamiltonian defined in Eqs.~(\ref{Kitaev_TB_Hamiltonian}) and (\ref{Kitaev_TB_tunneling_Hamiltonian}) by exact diagonalization. Fig.~\ref{fig:fourier_component}a compares the amplitude of the $h/e$-periodic component as a function of chemical potential with the analytical result in Eq.~(\ref{fourier}). The numerical results agree well with the behavior predicted by the low-energy model, except for small deviations in the immediate vicinity of the phase transition at $\mu=0$. In the inset of Fig.~\ref{fig:fourier_component}a we compare the analytical and numerical results for the quantities $\Gamma$ and $\epsilon_0$ appearing in the low-energy Hamiltonian. While the model correctly captures $\epsilon_0$ in the regime of interest, there are deviations of $\Gamma$ near $\mu=0$. These discrepancies are readily understood as a consequence of the finite circumference of the ring. Although the coherence length diverges at the phase transition, the Majorana bound states can delocalize at most throughout the entire length of the ring there remains a finite probability density of the Majorana bound state wavefunction at the weak link. Figure~\ref{fig:fourier_component}b shows that the left flank of the peak of $A_{h/e}$ and $e\Gamma/h$ deviate slightly. This deviation is a measure of the size of the bulk contribution to the $h/e$-periodic current. The latter can thus be seen to be small, justifying our focus on the low-energy Hamiltonian (12) describing the Majorana bound states only. In the same figure, the $h/2e$ component is plotted, showing that the $h/e$-periodic Josephson current exceeds the $h/2e$ component. This is a consequence of the tunneling regime that favors single-electron tunneling over the tunneling of Cooper pairs. In Fig.~\ref{fig:fourier_component}c, we show how the position of the peak in $A_{h/e}$ depends on the circumference of the ring. We find that the value of $\mu$ where the peak occurs scales as $1/L$. This result can be understood as follows. $\Gamma$ is essentially independent of the length of the ring, while $\epsilon_0$ scales as $\sim\exp(-L/\xi)$. As we have seen above the peak occurs at $\epsilon_0=\Gamma$. For given $t$, $\Delta_{\rm TB}$, and $t'$, $\Gamma$ is fixed and the peak occurs at a constant value of the ratio $L/\xi$. Since $\xi \sim 1/\mu$, the value of $\mu$ where the peak occurs scales as $1/L$. Also note that the above-mentioned tail of the peak at $\mu\leq 0$ originating from finite-size corrections is more pronounced in shorter rings. \section{Effects of disorder}\label{sec:disorder} \subsection{$h/e$-periodic Josephson current in disordered rings} \begin{figure}[tp!] \begin{center} \includegraphics[width=.46\textwidth]{peak_disorder_examp.pdf}\\ \includegraphics[width=.46\textwidth]{peak_disorder_low.pdf} \includegraphics[width=.46\textwidth]{peak_disorder_high.pdf} \end{center} \caption{(Color online) (a) Numerical results for the $h/e$-periodic Fourier component of the Josephson current, $A_{h/e}$, as function of chemical potential for a clean ring (black solid line) and disordered rings with four disorder configurations (green dashed lines) corresponding to $l=5$. (b) $A_{h/e}$ for a clean wire (black solid line) together with the histogram of the peak position in the presence of disorder for $l=75$ as a color code (green (gray) area). (c) Same as (b) with $l=5$. For all plots we chose $L=20$ and $\Delta_{\rm TB}=1$.} \label{fig:histres} \end{figure} In this section we investigate the fate of the peak in the equilibrium $h/e$-periodic Josephson current in the presence of disorder. Our main results are: \begin{enumerate} \item[(i)] The typical peak height is not affected by disorder as long as the mean free path is longer than the circumference of the ring. Thus the signature persists in the presence of moderate disorder. \item[(ii)] For stronger disorder the peak height decreases and the peak position is shifted to lower chemical potentials. \end{enumerate} To study the effect of disorder we add a random onsite potential $\sum_i V_i c_i^\dagger c_i$ to the tight-binding Hamiltonian (\ref{Kitaev_TB_Hamiltonian}) and (\ref{Kitaev_TB_tunneling_Hamiltonian}), where the $V_i$ are taken from a uniform distribution over the interval $[-W,+W]$. The mean free path is then related to the disorder strength as $l\propto 1/W^2$ \footnote{For the numerical results for the tight-binding model we extract the mean free path from the variance of the normal distribution of $\ln(\epsilon_0)$ according to Eq.~(\ref{probab_distr_eps0}).}. To obtain numerical results we compute the spectrum by exact diagonalization. Disorder affects the $h/e$-periodic Josephson current by introducing fluctuations in the quantities $\epsilon_0$ and $\Gamma$. While $\Gamma$ is mainly affected by local fluctuations of the probability density of the Majorana wavefunction at the junction, $\epsilon_0$ fluctuates due to the disorder potential in the entire ring. The interior overlap in disordered wires has been investigated previously for the continuum model (\ref{Kitaev_hamiltonian}) in regime (i), i.e., $\mu\gg m\Delta'^2$ \cite{Brouwer2011a}, where disorder leads to an increase of $\epsilon_0$ and subsequently to a disorder-induced phase transition to the nontopological phase. Fig.~\ref{fig:histres}a shows numerical results for the $h/e$-periodic Josephson current for a few disorder configurations. The peaks in the presence of disorder (green dashed curves) are of comparable height as the peak in the clean ring (black solid curve). The peak shifts as a function of chemical potential which indicates fluctuations of the coherence length due to disorder. Surprisingly, the peak shifts to lower chemical potentials, corresponding to a decrease in $\epsilon_0$ with disorder in stark contrast to the known case of large $\mu$. This implies that the topological phase is {\em stabilized} by disorder if the system is close to the phase transition. To investigate this further we plot the height and position of the peak maxima of many disorder configurations as a color code histogram for $l>L$ in Fig.~\ref{fig:histres}b and $l<L$ in Fig.~\ref{fig:histres}c. Indeed the average peak height is comparable to the one in the clean case for $l>L$. When $l\lesssim L$ the average peak height starts to decrease. The histogram in Fig.~\ref{fig:histres}c confirms that the peak is shifted to lower chemical potentials on average. \begin{figure}[t!] \begin{center} \includegraphics[width=.23\textwidth]{hist_gam1.pdf} \includegraphics[width=.23\textwidth]{hist_gam2.pdf} \end{center} \caption{(Color online) Histogram of $\Gamma$ for the same parameters as in Figs.~\ref{fig:histres}b and c at $\mu=0.4$. The dashed line denotes the value of $\Gamma$ for the clean ring.} \label{fig:histgam} \end{figure} To understand this behavior we analyze the probability distributions of $\epsilon_0$ and $\Gamma$ over the disorder ensemble. In Fig.~\ref{fig:histgam} we show numerical results for the histogram of $\Gamma$ corresponding to the two ensembles in Figs.~\ref{fig:histres}b and c at $\mu=0.4$. For weak disorder the distribution is symmetric with a mean near the zero-disorder tunnel coupling. For larger disorder when $l<L$ the distribution becomes wider and asymmetric and the average decreases. In order to determine the probability distribution for $\epsilon_0$ we now turn to the continuum Hamiltonian (\ref{Kitaev_hamiltonian}) for a wire of length $L$ without tunnel junction. To model short-range correlated disorder in the continuum model, we include a disorder potential with zero average $\langle V(x)\rangle =0$ and correlation function $\langle V(x) V(x^\prime)\rangle = \gamma \delta(x-x^\prime)$. For this model we employ a numerical method based on a scattering matrix approach \cite{Brouwer2003,Bardarson2007,Brouwer2011}. From the scattering matrix $S$ we obtain the lowest energy eigenstate $\epsilon_0$ by finding the roots of $\mathrm{det}(1-S(\epsilon))$. In this model, the probability distribution of the hybridization energy $\epsilon_0$ has been shown to be log-normal in Ref.~\onlinecite{Brouwer2011a}. Specifically, it was shown that the log-normal distribution is governed by \begin{align} \begin{split} \Braket{\ln\left(\epsilon_0/2\Delta_{\rm eff}\right)}&=-L\left(\frac{1}{\xi}-\frac{1}{2l}\right)\\ \text{var} \ln\left(\epsilon_0/2\Delta_{\rm eff}\right)&=\frac{L}{2l}. \end{split} \label{langevin_kitaev} \end{align} for regime (i). The distribution function reflects the disorder-induced phase transition to the nontopological state at $\xi = 2l$. \begin{figure}[t!] \begin{center} \includegraphics[width=.48\textwidth]{slope.pdf} \end{center} \caption{(Color online) Slope of $\Braket{\ln(\epsilon_0(L)/2\Delta_{\rm eff})}$ (see inset) vs. disorder strength $1/l$ for regimes (i) with $\mu=300$ m$\Delta'^2$ (blue dots) and (ii) with $\mu=3\times 10^{-3} $ m$\Delta'^2$ (red crosses) together with theoretical prediction according to Eqs.~(\ref{langevin_kitaev}) (dashed line) and (\ref{langevin_dirac}) with $\lambda=1/2$ (solid line). Inset: numerical data (red crosses) and linear fit (solid) of the average of $\ln\epsilon_0$ as a function of $L$ for different disorder strengths.} \label{fig:slope} \end{figure} The numerical results are presented in Fig.~\ref{fig:slope}. In the inset, we show that the mean of $\ln(\epsilon_0/2\Delta_{\rm eff})$ is indeed linear in $L$ with the slope depending on disorder strength. This slope is plotted as a function of inverse mean free path in Fig.~\ref{fig:slope}. The data for $\mu=300 m\Delta'^2$ (blue dots) agrees well with the prediction Eq.~(\ref{langevin_kitaev}) with the definitions $l=v_F^2/\gamma$ and $\xi=1/m\Delta'$. The same plot also shows data corresponding to regime (ii), i.e., $\mu\ll m\Delta'^2$, marked by red crosses. Here, we have $l=\Delta'^2/\gamma$ and $\xi=\Delta'/\mu$. Clearly, the behavior is qualitatively different from regime (i), since disorder decreases $\epsilon_0$ rather than increasing it. This is consistent with the shift of the peak of $A_{h/e}$ to lower $\mu$. In order to gain analytical insight we now derive the probability distribution of $\epsilon_0$ in regime (ii) extending the results of Ref.~\onlinecite{Brouwer2011a}. The relevant momenta at low energies in this regime are near $p=0$ (cf.\ Fig.~\ref{fig:spectrum}b). Linearizing the dispersion around this point yields the Dirac Hamiltonian Eq.~(\ref{Dirac_Hamiltonian}), where the disorder potential enters as a random mass term. Since the disorder potential is short-range correlated it couples high- and low-momentum degrees of freedom in the original Hamiltonian. Thus a proper linearization of the Hamiltonian requires one to project out the high-momentum states, which renormalizes the gap. For a strictly linear model with a random mass term, the overlap $\epsilon_0$ has a log-normal distribution \cite{Brouwer2011a}, \begin{align} \begin{split} \Braket{\ln\left(\epsilon_0/2\Delta_{\rm eff}\right)}&=-\frac{L}{\xi},\\ \text{var} \ln\left(\epsilon_0/2\Delta_{\rm eff}\right)&=\frac{L}{l}.\end{split} \label{langevin_dirac} \end{align} Thus for the Dirac Hamiltonian the mean of $\ln\left(\epsilon_0/2\Delta_{\rm eff}\right)$ does not depend on disorder. A systematic linearization of the disordered spinless $p$-wave superconductor in the vicinity of the topological phase transition effectively renormalizes the chemical potential $\mu$ and hence the coherence length $\xi=\Delta'/\mu$. We start by defining the projection operators $P=\sum_{|p|<p_1}\Ket{\psi_p}\Bra{\psi_p}$ onto the low momentum subspace and $Q=1-P$, where $\lbrace\Ket{\psi_p}\rbrace_p$ is a complete set of momentum eigenstates of the clean Hamiltonian. The relevant momentum scale for this projection is given by $p_1=m\Delta'$, since for $p\ll p_1$, the term $p^2/2m$ constitutes the lowest energy scale of the Kitaev Hamiltonian. Furthermore, we assume that the disorder potential does not affect high momenta $p_1\gg 1/l$. We can now project the clean Kitaev Hamiltonian $H$ to the low- and high-energy subspaces, \begin{align} PHP&\simeq P\left[(-\mu+V(x))\tau_z+\Delta'p\tau_x\right]P,\\ QHQ&\simeq Q\left(p^2/2m\right)\tau_zQ. \end{align} Both subspaces are exclusively mixed by the disorder potential $PHQ=PV(x)\tau_zQ$. To second order in $V$, the correction to the low-energy Hamiltonian is then given by \begin{align} \delta H(p)&\simeq \Braket{\psi_p|PHQ\left(\epsilon_p-QHQ\right)^{-1}QHP|\psi_p}\nonumber\\ &\simeq\sum_{|p'|>p_1}V_{pp'}\frac{1}{\epsilon_p-p'^2/2m\tau_z}V_{p'p}. \end{align} Here we used the short notation $V_{pp'}=\Braket{\psi_p|V(x)|\psi_{p'}}$. Averaging over disorder, we obtain \begin{align} \Braket{ \delta H(p)}&\simeq-\sum_{|p'|>p_1}\frac{2m\gamma}{p'^2}\tau_z\sim-\frac{\gamma}{\Delta'}\tau_z. \end{align} Thus the renormalization produces a contribution to the low-energy Hamiltonian which has the same structure as the chemical potential term. Hence we find a renormalized chemical potential $\mu'=\mu+\lambda\gamma/\Delta'$ with a numerical factor $\lambda>0$ that cannot be determined from this argument. Thus disorder enters the final result through the renormalized coherence length \begin{align} \frac{1}{\xi}\rightarrow \frac{1}{\xi}+\frac{\lambda}{l}.\label{renormalized_coherence_length} \end{align} The data in Fig.~\ref{fig:slope} confirm Eqs.~(\ref{langevin_dirac}) and (\ref{renormalized_coherence_length}) and determine the unknown numerical prefactor to be $\lambda=1/2$. Thus for $\mu\ll m\Delta'^2$, $\epsilon_0$ has a log-normal distribution with mean and variance given by \begin{align} \begin{split} \Braket{\ln\left(\epsilon_0/2\Delta_{\rm eff} \right)}&=-L\left(\frac{1}{\xi}+\frac{1}{2l}\right),\\ \text{var} \ln\left(\epsilon_0/2\Delta_{\rm eff}\right)&=\frac{L}{l}.\end{split}\label{probab_distr_eps0} \end{align} This result is very similar to Eq.~(\ref{langevin_kitaev}) where, however, the disorder correction to the decay length enters with opposite sign. This underlines the contrast between the two regimes, i.e., that disorder drives the system further into the topological phase when it is close to the phase transition, but away from it for larger chemical potentials. Specifically a spinless $p$-wave superconducting wire with negative chemical potential may exhibit edge states with an energy exponentially small in $L$ as long as disorder is strong enough. Combining the disorder-induced fluctuations of $\Gamma$ and $\epsilon_0$ we can understand the suppression of the peak in the $h/e$-periodic Josephson current in Fig.~\ref{fig:histres}c for $l< L$. While $\epsilon_0$ is decreased on average for a given $\mu$ with increasing disorder, $\Gamma$ does not increase at the same time and thus the average peak height decreases. However the fluctuations of $\Gamma$ and $\epsilon_0$ become larger as disorder increases such that for single disorder configurations significant peaks are still possible even if the average peak height decreases. \subsection{Phase diagram of a disordered wire} \begin{figure}[t!] \includegraphics[width=.48\textwidth]{Kit_PD.pdf} \caption{(Color online) Phase diagram of the continuum model (\ref{Kitaev_hamiltonian}) as function of disorder strength $\gamma$ and chemical potential $\mu$ in the regime $\mu\ll m\Delta'^2$. The data has been averaged over 100 disorder configurations. For $\mu<0$ disorder gives rise to a trivial-to-topological phase transition with a reentrant nontopological phase for stronger disorder. The dashed line denotes the phase transition line $\gamma^{(ii)}_c(\mu)$ valid for small $|\mu|$ given in Eq.~(\ref{phase_boundary}). Inset: Phase diagram for a larger range of $\mu$ and $\gamma$. The solid line represents the predicted phase boundary $\gamma^{(i)}_c(\mu)$ for large $\mu$. (The analytical phase boundary is only accurate at large $\mu$ up to sublinear corrections.)} \label{fig:phase_diagram} \end{figure} Motivated by the contrasting probability distributions of $\epsilon_0$ in the regimes of large and small $\mu$ we numerically calculate the phase diagram of the continuum model (\ref{Kitaev_hamiltonian}) as a function of $\mu$ and $\gamma$, particularly paying attention to the region near the topological phase transition of the clean model. By means of the scattering matrix approach also used in the last section we compute the determinant of the reflection matrix of a wire of length $L$ at $\epsilon=0$ which approaches the values $+1$ and $-1$ as $L\rightarrow\infty$ in the nontopological and topological phase, respectively \cite{Merz2002,Akhmerov2011}. The resulting phase diagram is plotted in Fig.~\ref{fig:phase_diagram}. From Eq.~(\ref{langevin_kitaev}) we infer that the topological phase transition occurs for $\xi=2l$ in the regime $\mu\gg m\Delta'^2$. Using the definitions of $l$ and $\xi$ in this regime, we obtain the phase boundary $\gamma_c^{(i)}(\mu)=4\Delta'\mu$. This is compared with the numerical results in the inset of Fig.~\ref{fig:phase_diagram}. The numerically calculated phase boundary $\gamma_c^{\rm num}(\mu)$ has only sublinear deviations from the predicted line, so that the ratio $\gamma_c^{\rm num}(\mu)/2\mu\Delta'=\xi/l$ approaches the value $2$ for $\mu\rightarrow\infty$ as expected. However, near $\mu=0$ the behavior is qualitatively different. Here, disorder can induce a topological phase for $\mu<0$ as well as a reentrant nontopological phase at larger disorder. From Eq.~(\ref{probab_distr_eps0}) we find the condition $\xi=-2l$ for the phase boundary. This corresponds to \begin{align} \gamma^{(ii)}_c(\mu)=-2\Delta'\mu,\label{phase_boundary} \end{align} which we find to agree well with the numerical results for the phase diagram (see dashed line in Fig.~\ref{fig:phase_diagram}). Thus the phase diagram confirms that weak disorder leads to an enhancement of the chemical potential range of the topological phase, while for stronger disorder the range decreases again. \section{Conclusion} Even for conventional superconducting phases, the flux periodic currents have been widely studied for mesoscopic rings \cite{Buttiker1986,Oppen1992,Schwiete2010,Koshnick2007}. Here, we studied the Josephson currents across a weak link in a mesoscopic ring in a topological superconducting phase. As a paradigmatic model system, we studied Kitaev's model of a one-dimensional spinless $p$-wave superconductor, focusing on the parameter regime near the topological phase transition. We found that in mesoscopic rings, there is an $h/e$-periodic contribution to the tunneling current even if electron number parity is not conserved. This $h/e$-periodic contribution emerges due to the hybridization of the Majorana bound states localized on the two sides of the weak link through the interior of the ring and exhibits a pronounced peak just on the topological side of the topological phase transition. This peak provides an interesting signature for the existence of a topological phase transition and the formation of Majorana fermions at the junction. We found that this effect remains robust in the presence of disorder in the wire. In fact, near the topological phase transition disorder can even stabilize the topological phase. When tuning, say, the chemical potential of the system to the nontopological side of the phase transition, there is a disorder-induced topological phase for moderate amounts of disorder, with a reentrant nontopological phase at even stronger disorder. This is in stark contrast to the behavior of the system far in the topological phase where disorder weakens and eventually destabilizes the topological phase. \begin{acknowledgments} We would like to acknowledge discussions with P.\ Brouwer, A. Haim, N.\ Lezmy, and G.\ Refael. We are grateful for partial support by SPP 1285 of the Deutsche Forschungsgmeinschaft (FvO and YO), the Virtual Institute ``New states of matter and their excitations'' (FvO), grants of ISF and TAMU (YO) as well as a scholarship of the Studienstiftung d.\ dt.\ Volkes (FP). \end{acknowledgments}
{ "redpajama_set_name": "RedPajamaArXiv" }
4,918
{"url":"https:\/\/www.physicsforums.com\/threads\/find-centroid-of-catenary-y-cosh-x.768494\/","text":"# Find centroid of catenary (y=cosh(x))\n\n1. Sep 1, 2014\n\n### oddjobmj\n\n1. The problem statement, all variables and given\/known data\nA uniform chain hangs in the shape of the catenary y=cosh(x) between x=\u22121 and x=1\n\nFind $\\bar{y}$\n\n2. Relevant equations\n\u222b$\\bar{y}$$\\rho$ds=\u222by$\\rho$ds\n\n3. The attempt at a solution\nI can define ds (some small segment of the arc) by $\\sqrt{1+sinh(x)^2}$dx.\n\nAlso, y is given as y=cosh(x)\n\nIf I take the integral above from -1 to 1 as:\n\n\u222bcosh(x)*$\\sqrt{1+sinh(x)^2}$dx\n\nI get ~2.8\n\nThe problem I have with this answer is that the maximum y of this catenary is y=cosh(1) which is below y=2. The minimum value of the catenary is y=cosh(0)=1 so the y centroid should be somewhere between those two points.\n\nWhat am I doing wrong? Thanks!\n\nLast edited: Sep 1, 2014\n2. Sep 1, 2014\n\n### BvU\n\nWhat does your $\\int ds$ yield ?\n\n3. Sep 1, 2014\n\n### oddjobmj\n\nArc length. This turns out to be about 2.4 between x=-1 and x=1.\n\nedit: from my book: (The example they use is y=x^2 between 0 and 1.)\n\nAm I supposed to go about calculating the integral and then setting it equal to the form with $\\bar{y}$ in it to solve for $\\bar{y}$?\n\nLast edited: Sep 1, 2014\n4. Sep 1, 2014\n\n### Ray Vickson\n\nIsn't that exactly what the last equation says?\n\n5. Sep 1, 2014\n\n### dirk_mec1\n\nYou have to solve for y_COG from the equation as written in your notes.\n\n6. Sep 1, 2014\n\n### LCKurtz\n\nIf you factor the constant $\\bar y$ out of the second equation of 3.6 and solve for $\\bar y$ you will have the formula you need. You have just calculated part of it.\n\n7. Sep 1, 2014\n\n### BvU\n\nCorrect. And the 2.8 you had before divided by the 2.4 arc length gives you $\\bar y$ as per your own relevant equation in post #1. Done !","date":"2017-11-22 02:19:02","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 2, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.32784542441368103, \"perplexity\": 7871.32734228771}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 5, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-47\/segments\/1510934806447.28\/warc\/CC-MAIN-20171122012409-20171122032409-00514.warc.gz\"}"}
null
null
\section{Introduction} \label{Sintro} Topological phases of matter is one of the hottest topics of contemporary solid state physics. In magnetism, individual skyrmions, their ordered arrays (skyrmion lattices, SkL), and various other topologically nontrivial structures are extensively studied (see, e.g., Refs.~\cite{bogdanov2020,gobel2021} and references therein). In noncentrosymmetric magnets, skyrmions and SkL were predicted theoretically in seminal papers~\cite{bogdanov1989,bogdanov1994}. Experimental observation of SkL in the so-called \emph{A} phase of MnSi by means of elastic neutron scattering~\cite{muhlbauer2009} stimulates a plethora of further studies on this topic. Noteworthy, this interest is partially caused by promising technological applications (see, e.g., Refs.~\cite{fert2013, fert2017} and references therein). Crucial skyrmion property relates to its nontrivial topology, which can be characterized by the topological charge~\cite{belavin1975metastable} \begin{equation}\label{charge1} Q = \frac{1}{4 \pi} \int \mathbf{n} \cdot \left[ \partial_x \mathbf{n} \times \partial_y \mathbf{n} \right] dx dy, \end{equation} where the $\mathbf{n}=\mathbf{s}/|\mathbf{s}|$ is the unit vector along the local spin value, averaged over thermal and/or quantum fluctuations. Single skyrmion usually has $Q=\pm 1$. For SkL the natural measure of topological charge is its density $n_{sk}$, which, e.g., defines the topological contribution to the Hall resistivity, since $\rho^T \propto n_{sk}$~\cite{neubauer2009}. In noncentrosymmetric magnets the size of a magnetic unit cell is quite large, being of the order of $J/D \gg 1$ lattice parameters (here $J$ is some characteristic exchange energy, $D$ is a value of Dzyaloshinskii-Moriya interaction~\cite{dzyaloshinsky1958,moriya1960}), so $n_{sk}$ is somewhat suppressed. In contrast, in frustrated helimagnets modulation vectors are usually not small, which results in typical size of magnetic unit cell of the order of several nanometers (see Ref.~\cite{kurumaji2019Rev}). This leads to large $n_{sk}$ and the giant topological Hall effect, which were observed for the first time in Ref.~\cite{kurumaji2019SkL} in Gd$_2$PdSi$_3$ compound. \begin{figure} \centering \hfill \includegraphics[width=4cm]{lattice2.pdf} \hfill \includegraphics[width=4.5cm]{dipole.pdf} \hfill \caption{(a) In the considered model, magnetic ions are arranged hexagonally in the \emph{ab} plane. For each incommensurate in-plane modulation vector there are at least two counterparts due to the symmetry of the system. Here we sketch three modulation vectors, which were experimentally observed in Gd$_2$PdSi$_3$~\cite{kurumaji2019SkL}, and show the cartesian $xyz$-coordinates we use in our calculations (out-of-plane $\hat{z}$ direction is chosen along the $\mathbf{c}$ axis). (b) Due to dipolar forces, in the first Brillouin zone (large hexagon) for the in-plane modulation vectors $\mathbf{q}=(q_x,q_y,0)$ the $\mathbf{c}$ axis is the easy one outside the black hexagon, wherein it plays a role of the middle axis; the hard axis is always along the $\mathbf{q}$. Consequently, at relatively small external magnetic fields, the screw helicoids are energetically favorable. Furthermore, we show that in a large part of the phase diagram the triple $Q$ structure is stable.}\label{Fig1} \end{figure} Theoretically, stable skyrmions and SkL in frustrated centrosymmetric helimagnets are usually ascribed to interplay of lattice symmetry, exchange interaction, Zeeman energy and certain kind(s) of anisotropic interactions~\cite{okubo2012,leonov2015,lin2016}. For instance, in Ref.~\cite{leonov2015} multiple \emph{Q} states including SkL were predicted at low temperatures for triangular lattice with the easy-axis single-ion anisotropy. Next, it was shown that related models with bilinear and biquadratic $xxz$-type exchange interactions~\cite{hayami2020multiple} and single-ion and bond-dependent anisotropies~\cite{hayami2021noncop} also yields rich phase diagrams in parameter space at low temperature. Furthermore, recent experimental observation of the SkL in tetragonal system GdRu$_2$Si$_2$~\cite{khanh2020} stimulates theoretical research on low-temperature phases, where importance of biquadratic exchange and compass anisotropy terms were highlighted~\cite{hayami2021square, wang2021}. However, it was shown that the main features of the observed in Ref.~\cite{khanh2020} phase diagram can be described within the simple model with magneto-dipolar interaction and easy-axis anisotropy~\cite{utesov2021tetragonal}. In the present paper, we show the importance of dipolar forces in the phase diagram of hexagonal frustrated helimagnets, including SkL stabilization. Magneto-dipolar interaction, despite being small, can play significant role in helimagnets properties including temperature- and magnetic-field-induced phase transitions (see, e.g., Refs.~\cite{shiba,gekht1984,gekht,mnbr2,sato,Utesov2017,UtesovMn,utesov2021tetragonal,utesov2021phase}). Noteworthy, for magnetic ions in spherically-symmetrical $L=0$ state (as, e.g., Gd$^{3+}$ in Gd$_2$PdSi$_3$~\cite{kotsanidis1990}) the dipolar forces are of particular importance, since the strength of other anisotropic interactions is governed by the spin-orbit coupling~\cite{white}. \section{Model} \label{Smodel} We consider a simple model of a hexagonal frustrated antiferromagnet with one magnetic ion per crystallographic unit cell. The system Hamiltonian is following: \begin{eqnarray} \label{ham1} \mathcal{H} &=& \mathcal{H}_{ex} + \mathcal{H}_{d} + \mathcal{H}_{z}, \nonumber \\ \mathcal{H}_{ex} &=& -\frac12 \sum_{i,j} J_{ij} \left(\mathbf{S}_i \cdot \mathbf{S}_j\right), \nonumber \\ \mathcal{H}_d &=& \frac12 \sum_{i,j} D^{\alpha \beta}_{ij} S^\alpha_i S^\beta_j, \\ \mathcal{H}_z &=& - \sum_i \left(\mathbf{h} \cdot \mathbf{S}_i\right).\nonumber \end{eqnarray} Here, along with the conventional symmetrical Heisenberg and Zeeman interactions [$\mathbf{h}= - g\mu_B \mathbf{H}$ is the external magnetic field in energy units (1~T $\approx$ 1.34~K), which for definiteness will be oriented along the $\mathbf{c}$ axis], we also take into account the dipolar forces. The dipolar tensor reads \begin{equation}\label{dip1} {\cal D}^{\alpha \beta}_{ij} = \omega_0 \frac{v_0}{4 \pi} \left( \frac{1}{R_{ij}^3} - \frac{3 R_{ij}^\alpha R_{ij}^\beta }{R_{ij}^5}\right), \end{equation} where $\alpha$ and $\beta$ denote cartesian coordinates. The strength of the magnetodipolar interaction is governed by \begin{equation}\label{dipen} \omega_0 = 4 \pi \frac{(g \mu_B)^2}{v_0}, \end{equation} which is usually about $0.1 \div 1$~K ($v_0$ stands for the unit cell volume). For instance, in Gd$_2$PdSi$_3$, one has $\omega_0 \approx 0.53$~K (we use low-temperature lattice parameters from Ref.~\cite{tang2011}). For the subsequent analysis it is convenient to introduce the Fourier transform \begin{equation} \label{four1} \mathbf{S}_j = \frac{1}{\sqrt{N}} \sum_\mathbf{q} \mathbf{S}_\mathbf{q} e^{i \mathbf{q} \mathbf{R}_j}. \end{equation} Here $N$ is the total number of spins. Plugging this expression into the Hamiltonian~\eqref{ham1} we get \begin{eqnarray} \label{ex2} \mathcal{H}_{ex} &=& -\frac12 \sum_\mathbf{q} J_\mathbf{q} \left(\mathbf{S}_\mathbf{q} \cdot \mathbf{S}_{-\mathbf{q}}\right), \\ \label{dip2} \mathcal{H}_d &=& \frac12 \sum_\mathbf{q} {\cal D}^{\alpha \beta}_\mathbf{q} S^\alpha_\mathbf{q} S^\beta_{-\mathbf{q}}. \\ \label{z21} \mathcal{H}_z &=& - \sqrt{N} \left(\mathbf{h} \cdot \mathbf{S}_{\bf 0}\right). \end{eqnarray} The former two terms can be combined into bilinear in spin components part \begin{equation}\label{tens1} \mathcal{H}_0 = - \sum_\mathbf{q} \mathcal{H}^{\alpha\beta}_\mathbf{q} S^\alpha_\mathbf{q} S^\beta_{-\mathbf{q}}. \end{equation} In the reciprocal space, symmetrical tensor $\mathcal{H}^{\alpha\beta}_\mathbf{q}$ determines three eigenvalues $\lambda_1(\mathbf{q}) \geq \lambda_2(\mathbf{q}) \geq \lambda_3(\mathbf{q})$ corresponding to three mutually perpendicular eigenvectors $\mathbf{v}_1(\mathbf{q}), \, \mathbf{v}_2(\mathbf{q}), \, \mathbf{v}_3(\mathbf{q})$. The latter can be considered as a set of principal axes for momentum-dependent biaxial anisotropy originating from the dipolar interaction. Note, that standard easy-axis and easy-plane anisotropies, and also more tricky compass anisotropy~\cite{banerjee2013,chen2016exotic} can be easily included into this scheme: they simply modify eigenvalues $\lambda_k$. Since our goal is to describe the high-temperature part of the phase diagram, we denote averaged over thermal fluctuations values $ \langle \mathbf{S}_i \rangle$ as $\mathbf{s}_i$ (and $\langle \mathbf{S}_\mathbf{q} \rangle$ as $\mathbf{s}_\mathbf{q}$). Near the ordering temperature $|\mathbf{s}_i| \ll S$, and one can expand the free energy of the mean-field approach in powers of the order parameters as follows (see, e.g., Refs.~\cite{gekht1984, Utesov2017} for details): \begin{equation}\label{Free1} \mathcal{F} = - \sum_\mathbf{q} \mathcal{H}^{\alpha\beta}_\mathbf{q} s^\alpha_\mathbf{q} s^\beta_{-\mathbf{q}} - \sqrt{N} \mathbf{h} \cdot \mathbf{s}_{\bf 0} + A T \sum_i s^2_i + B T \sum_i s^4_i. \end{equation} The expansion constants read~\cite{gekht1984} \begin{eqnarray} A = \frac{3}{2S(S+1)}, \quad B = \frac{9[(2S+1)^4-1]}{20 (2S)^4(S+1)^4}. \end{eqnarray} For $S=7/2$ one has $A \approx 0.095$ and $B \approx 0.002$. In general, the ordering temperature of the model~\eqref{Free1} corresponds to the largest eigenvalue $\lambda_1(\mathbf{q})$ where the system becomes unstable towards formation of the magnetic structure with the corresponding momentum. As the dipolar interaction is typically much smaller than the frustrated exchange coupling, this maximum approximately corresponds to the momentum $\mathbf{k}$, which maximizes $J(\mathbf{q})$. It is usually incommensurate due to the frustration, and in low-symmetry lattices either spiral (if $\lambda_1(\mathbf{k})=\lambda_2(\mathbf{k})$) or sinusoidal spin-density wave (SDW) (for $\lambda_1(\mathbf{k}) > \lambda_2(\mathbf{k})$) ordering emerge at $T_c = \lambda_1(\mathbf{k})/A$. For high-symmetry lattices there can be several equivalent $\mathbf{k}$, which can lead to the stabilization of various so-called multiple-$Q$ structures, and SkL in particular (see, e.g., Ref.~\cite{utesov2021tetragonal} for the discussion of tetragonal frustrated antiferromagnet). Below, we concentrate on a relevant to Gd$_2$PdSi$_3$ case of three equivalent in-plane modulation vectors $\mathbf{k}_1=k(0,1,0),\mathbf{k}_2 = k(-\sqrt{3}/2,-1/2,0), \mathbf{k}_3 = k(\sqrt{3}/2,-1/2,0)$ with angles $120^\circ$ between them (cartesian coordiantes are used, see Fig.~\ref{Fig1}(a) and Ref.~\cite{kurumaji2019SkL}); generalization of the results to another set of in-plane vectors is straightforward. Importantly, the dipolar tensor for in-plane modulation vectors has quite simple properties. Basically, it favors screw helicoid structure~\footnote{Qualitatively it can be understood using analogy with Bloch domain walls in ferromagnets: spin component along the modulation vector leads to positive correction to the magnetic structure energy from dipolar interaction.}. In more details, the $\mathbf{c}$-axis is a middle axis for relatively small $\mathbf{q}$ and it is an easy axis in the rest part of the first Brillouin zone (see Fig.~\ref{Fig1}(b)). Moreover, the hard axis is approximately parallel to $\mathbf{q}$ with good accuracy (for high-symmetry directions it is an exact feature), so the perpendicular to $\mathbf{q}$ direction plays a role of the easy or middle axis, depending on the $\mathbf{q}$ position in the Brillouin zone [for $\mathbf{k}_{1,2,3}$ we choose the corresponding vectors as follows: $\mathbf{e}_1 = (-1,0,0), \mathbf{e}_2=(1/2,-\sqrt{3}/2,0), \mathbf{e}_3=(1/2,\sqrt{3}/2,0) $]. This axes hierarchy is crucial for the hexagonal SkL stabilization, as it is shown below. \section{Phase Diagram: in-plane easy axes} First, we assume that the $\mathbf{c}$ axis is the middle one for the modulation vectors $\mathbf{k}_j$. So, the easy axes are lying in-plane and the angles between them are 120$^\circ$. External magnetic field is applied along the $\mathbf{c}$ axis; corresponding eigenvalue $\lambda_\mathbf{0} = (J_\mathbf{0} - \omega_0 \mathcal{N}_{zz})/2$ ($\mathcal{N}_{zz}$ is the demagnetization tensor component~\cite{SpinWaves} if the shape of the sample is ellipsoid). In order to simplify equations we introduce ``temperature'' $t= \lambda_1 - AT$ (it is positive in the magnetically ordered phases) and parameters $\Lambda = \lambda_1 - \lambda_2$, $\Lambda^{\prime} = \lambda_1 - \lambda_3 > \Lambda$, and $\Lambda_0 = \lambda_1 - \lambda_0$. Finally, it is sufficient to substitute $B T$ by $b = B T_c$ in Eq.~\eqref{Free1}. Similarly to Ref.~\cite{utesov2021tetragonal}, we restrict our analysis to particular set of magnetic structures. We also neglect possible small variations of the modulation vectors among the phases with multi-component order parameter, which can appear due to dipolar tensor eigenvalues nontrivial momentum-dependence. Details of calculations are mostly presented in the Appendix~\ref{AppendA}. (i) simple SDW (it will be referred to as 1$S$). One can choose any vector from $\mathbf{k}_{j}$ and arbitrary phase of cosine, e.g., \begin{equation}\label{S1S1} \mathbf{s}_i = s \mathbf{e}_1 \cos{\mathbf{k}_1 \mathbf{R}_i} + m \hat{z}. \end{equation} Corresponding free energy per one spin reads \begin{eqnarray} \label{F1S} \mathcal{F}_{1S} &=& -\frac{t}{2}s^2 - h m - (t-\Lambda_0) m^2 + \nonumber \\ &&+ b \left(m^4 + m^2 s^2 +\frac{3}{8} s^4 \right). \end{eqnarray} (ii) simple helicoid with spins rotating in the easy plane perpendicular to $\mathbf{q}$ (it will be referred to as 1$Q$). Taking, e.g., $\mathbf{k}_1$ we have \begin{equation}\label{S1Q1} \mathbf{s}_i = s \mathbf{e}_1 \cos{\mathbf{k}_1 \mathbf{R}_i} + p \hat{z} \sin{\mathbf{k}_1 \mathbf{R}_i} + m \hat{z}. \end{equation} Here $s p>0$ corresponds to the right spiral, and $s p <0$ to the left one, also the common phase of sine and cosine functions can be chosen arbitrary. Corresponding free energy per one spin reads \begin{eqnarray} \label{F1Q} \mathcal{F}_{1Q}= -\frac{t}{2}s^2 - \frac{t-\Lambda}{2}p^2- h m - (t-\Lambda_0) m^2 + \nonumber \\ b \left[m^4 + m^2 (s^2 + 3 p^2) +\frac{3s^4 + 2 s^2 p^2 + 3 p^4}{8} \right]. \end{eqnarray} (iii) conical spiral with spins rotating in the \emph{ab} plane, perpendicular to the magnetic field (this structure will be referred to as XY). For spin ordering one has \begin{equation}\label{SXY1} \mathbf{s}_i = s \mathbf{e}_1 \cos{\mathbf{k}_1 \mathbf{R}_i} + p \hat{z}\times\mathbf{e}_1 \sin{\mathbf{k}_1 \mathbf{R}_i} + m \hat{z}. \end{equation} Once again, signs of $s$ and $p$ can be taken arbitrary as well as the common phase. Corresponding free energy per one spin reads \begin{eqnarray} \label{FXY} \mathcal{F}_{XY}= -\frac{t}{2}s^2 - \frac{t-\Lambda^\prime}{2}p^2- h m - (t-\Lambda_0) m^2 + \nonumber \\ b \left[m^4 + m^2 (s^2 + p^2) +\frac{3s^4 + 2 s^2 p^2 + 3 p^4}{8} \right]. \end{eqnarray} Important differences with Eq.~\eqref{F1Q} are the following: $\Lambda^\prime$ instead of $\Lambda$ and $b m^2 p^2$ instead of $3 b m^2 p^2$, so at low magnetic fields the 1$Q$ structure is preferable, but at stronger fields $\mathcal{F}_{XY}$ becomes smaller. (iv) the triple-$Q$ structure, which is a superposition of three screw helicoids (3$Q$). In general, one can consider this ordering with many parameters \begin{eqnarray}\label{S3Q1} \mathbf{s}_i &=& \sum_{j=1,2,3} \left[s_j \mathbf{e}_j \cos{(\mathbf{k}_j \mathbf{R}_i + \varphi_j)} + p_j \hat{z} \sin{(\mathbf{k}_j \mathbf{R}_i + \varphi_j)}\right] \nonumber \\ &&+ m \hat{z}. \end{eqnarray} However, a minimal free energy can be achieved only if [except for the 1$Q$ structure, which can be also described by Eq.~\eqref{S3Q1}] $s_1=s_2=s_3=s/\sqrt{3}$, $p_1=p_2=p_3 = p/\sqrt{3}$, and the following restriction on phases is satisfied: $\varphi_1+\varphi_2+\varphi_3 = 2 \pi n + \textrm{sign}(p) \pi/2$.~\footnote{Note, that the chiralities of all three helicoids are the same.} Corresponding free energy is given by \begin{eqnarray} \label{F3Q} \mathcal{F}_{3Q}= -\frac{t}{2}s^2 - \frac{t-\Lambda}{2}p^2- h m - (t-\Lambda_0) m^2 + \nonumber \\ b \Biggl[m^4 + m^2 (s^2 + 3 p^2) +\frac{9s^4 + 10 s^2 p^2 + 15 p^4}{24} \\ - \frac{m p (2p^2+s^2)}{\sqrt{3}} \Biggr]. \nonumber \end{eqnarray} The last term here is the most important one. Note, that if all $p_j=0$ in Eq.~\eqref{S3Q1} the corresponding magnetic structure is a triple SDW or 3$S$. Moreover, its free energy is the same with the simple 1$S$ structure~\footnote{This degeneracy can be lifted by taking into account $\propto s^6$ terms in the free energy. The result is that the 1$S$ free energy is always slightly smaller than the 3$S$ one}. However, it is evident from Eq.~\eqref{F3Q} that even at infinitesimal $h$, when nonzero $m$ appears, the 3$S$ structure is unstable towards transition to 3$Q$ structure. So, if the easy axes are in-plane, the 3$Q$ structure always has lower energy than the 1$S$ and 3$S$. For analytical treatment of these phases free energies and phase diagram description, we use the following trick: in equation $\partial \mathcal{F}/\partial m = 0$ we neglect terms with the forth power of order parameter components, assuming that the system near $T_c$ is not close to ferromagnetic instability. So, the magnetization simply reads \begin{eqnarray} \label{mag1} m(t,h) = \chi(T) h = \frac{h}{2(\Lambda_0-t)}. \end{eqnarray} Furthermore, usually $\Lambda_0 \gg \Lambda, \Lambda^\prime$ and it is sufficient to put $\chi \equiv \chi(T_c) = 1/ 2 \Lambda_0$ instead of $\chi(T)$. Under this assumption, it is fruitful to use parameters $t$ and $\Lambda$ renormalized by terms $\propto m^2$ in calculations, which can be defined as \begin{eqnarray} \label{th} t_h = t - 2 b (\chi h)^2, \\ \label{Lh} \Lambda_h = \Lambda + 4 b (\chi h)^2. \end{eqnarray} Then, it is easy to show that both 1$S$ and 3$Q$ phases require $t_h>0 \Leftrightarrow t> 2 b (\chi h)^2$. This inequality determines the phase boundary between 3$Q$ and paramagnetic (or induced ferromagnetic) phase, PM. If we for a moment forget about the 3$Q$ structure a simple phase diagram shown in Fig.~\ref{FPhaseWO3Q} can be easily obtained. Important scales here are determined by the coordinates of the triple point (where 1$S$, 1$Q$, and XY are in equilibrium), namely the spiral plane flop field \begin{eqnarray} \label{hsf} h_{SF} = \sqrt{\frac{\Lambda^\prime - \Lambda}{4 b \chi^2}} \end{eqnarray} and the ``temperature'' \begin{eqnarray} \label{ttr} t_{Tr} = 2 \Lambda^\prime - \Lambda/2. \end{eqnarray} However, 3$Q$ has lower energy than 1$S$, and it pushes the XY phase further away to $t$ substantially larger, than $t_{Tr}$. Moreover, below we show that for realistic parameters of Gd$_2$PdSi$_3$ the XY phase does not appear at all in the range of mean-field approach validity. So, the resulting phase diagram consists of 1$Q$ and 3$Q$ phases. The boundary between them is approximately given by \begin{eqnarray} \label{t1Q3Q} t_{1Q-3Q}(h) \approx \frac{3}{2} \Lambda + 45 b (\chi h)^2. \end{eqnarray} Importantly, inside 3$Q$ phase there exists a boundary dividing topologically trivial and nontrivial parts. We show these two spin structures in Fig.~\ref{FigSkL}. For nontrivial structure topology with $n_{Sk} = \pm 1$ (the sign here depends on chirality of helicoid constituents), spin should be able to point against the magnetization, which is equivalent to $ \sqrt{3} p > m$. In our approximation this boundary can be found exactly as \begin{eqnarray} \label{tSkL} t_{SkL}(h) = \frac{9}{10} \Lambda + \frac{203}{45} b (\chi h)^2 \approx 0.9 \Lambda + 4.5 b (\chi h)^2. \end{eqnarray} At $t <t_{SkL}$ (which corresponds to larger temperatures in reality) the 3$Q$ structure is topologically trivial with $n_{Sk} = 0$. Note, that in our approach $t_{SkL}(h)$ has not physical meaning of a phase transition temperature. However, one can expect some anomalies due to possible effects of topology on other, e.g., electronic degrees of freedom. \begin{figure} \centering \includegraphics[width=6cm]{SkL.pdf} \centering \includegraphics[width=6cm]{vortex.pdf} \caption{The 3$Q$ phase, which is a superposition of three homochiral (left or right) helicoids and constant spin component -- magnetization, can be either topologically nontrivial at moderate magnetic fields (a), where spins wrap around a sphere ones per skyrmion, or trivial (b) at fields close to the saturation one (see Fig.~\ref{FPhase1}). In the latter case, $z$ components of all spins are positive (however, with non-negligible modulated part) and the corresponding topological charge is evidently zero. Here $\mathbf{h} \uparrow\uparrow \mathbf{c}$, red spins are ``up'' ($s_z>0$) and violet spins are ``down'' ($s_z<0$) . }\label{FigSkL} \end{figure} We apply our theory to Gd$_2$PdSi$_3$, which parameters can be estimated using the ordering temperature $T_N \approx 22$~K and the saturation field $H_S \approx 9$~T~\cite{hirschberger2020, spachman2021}. The former quantity determines $J_{\mathbf{k}}$ for $k=0.14$~\cite{kurumaji2019SkL} (in reciprocal lattice units, r.l.u.), whereas the second one can be used to estimate $J_{\mathbf{0}}$, since $h_S \approx S(J_{\mathbf{k}} - J_{\mathbf{0}})$ in frustrated helimagnets (see, e.g., Refs.~\cite{Nagamiya1962,utesov2021phase}). Dipolar tensor components can be calculated using their representation in the form of fast converging sums (see, e.g., Ref.~\cite{cohen}). As a result we get (all values are in kelvins) \begin{eqnarray} \label{param1} J_{\mathbf{k}} \approx 4.00, \, J_{\mathbf{0}} \approx 0.56, \nonumber \\ \Lambda \approx 0.02, \, \Lambda^\prime \approx 0.26, \, \Lambda_0 \approx 1.72. \end{eqnarray} Using this set of parameters we obtain the phase diagram shown in Fig.~\ref{FPhase1}. Note, that it is similar to the high-temperature part of the phase diagram, observed experimentally in Refs.~\cite{kurumaji2019SkL,hirschberger2020} for Gd$_2$PdSi$_3$ compound. Our theory suggests topologically trivial 3$Q$ structure for IC-2 (however, its more complicated that the 3$S$ vortex structure with constant $s_z$, which was described in Ref.~\cite{gekht1984}), Bloch-type hexagonal SkL for the $A$ phase, and simple 1$Q$ helicoid phase for IC-1 (notation IC-1, IC-2 and $A$ phase belong to Ref.~\cite{kurumaji2019SkL}). We would like to stress, that triangular meron-antimeron lattice which is 3$Q$ structure with $\varphi_1 + \varphi_2 + \varphi_3 = \pi n$ in our high temperature approach always has larger free energy than 1$Q$, see Eq.~\eqref{AF3Q1}. IC-1 phase non-coplanarity~\cite{kurumaji2019SkL} can be thus a result of three helical domains and the domain walls among them. It can be checked experimentally by applying in-plane magnetic field along certain $\mathbf{k}_j$, which will choose the corresponding helical domain. However, we note, that meron-antimeron lattices can be stabilized in systems with biquadratic exchange and Dzyaloshinskii-Moriya interaction~\cite{hayami2021meron}. \begin{figure} \centering \includegraphics[width=8cm]{phase1.pdf}\\ \caption{High-temperature part of the phase diagram for centrosymmetric hexagonal frustrated antiferromagnet with dipolar interaction (see Fig.~\ref{Fig1}). The parameters~\eqref{param1} relevant to Gd$_2$PdSi$_3$ were used. Usual for dipolar forces-induced anisotropy simple SDW (1S) and conical helicoid (XY) (see Fig.~\ref{FPhaseWO3Q}) do not appear in this region of the phase diagram. They are substituted by the 3$Q$ phase in its topologically trivial and non-trivial forms (see text). }\label{FPhase1} \end{figure} The type of the phase diagram shown in Fig.~\ref{FPhase1} is quite general (in a qualitative sense) for the model with in-plane easy axes. Nevertheless, by varying the parameters, XY phase can appear in the approach validity region. We illustrate this statement by manually setting $\Lambda^\prime = 0.05$ in Eq.~\eqref{param1}, which results in the phase diagram shown in Fig.~\ref{FPhaseXY1} with observable regions of the conical phase. Note, that in this case $T_{Tr} \approx 21$~K, however XY emerges only at $T \approx 18$~K due to the competition with 3$Q$. \section{Easy axis along $\mathbf{c}$} According to Fig.~\ref{Fig1} there is a possibility to have collinear easy axes along $\mathbf{c}$ for all three $\mathbf{k}_j$ solely due to dipolar interaction. However, this requires rather large $k$. At the same time, standard single-ion easy-axis anisotropy can also change the axes hierarchy (its constant should be subtracted from the $\mathcal{H}^{\alpha \beta}_\mathbf{q}$ in-plane eigenvectors eigenvalues and added to the ones corresponding to the $\mathbf{c}$ axis). In both cases we can arrive to substantially different phase diagram, which is discussed below. First, we would like to point out several important differences with the previous case: (i) modulated component of the 1$S$ phase is now along $\hat{z}$, (ii) for free energies of 1$Q$ and 3$Q$ phases $t-\Lambda$ is multiplied on $s^2$, not on $p^2$ as previously, (iii) in conical XY phase modulated spin component rotates perpendicular to the easy axis, and (iv) in magnetic field the following counterparts of Eqs.~\eqref{th} and~\eqref{Lh} should be used: \begin{eqnarray} \label{th2} t_h = t - 6 b (\chi h)^2, \\ \label{Lh2} \Lambda_h = \Lambda - 4 b (\chi h)^2. \end{eqnarray} \begin{figure} \centering \includegraphics[width=6cm]{3P.pdf}\\ \caption{When the easy axes are along the $\mathbf{c}$, peculiar 3$P$ phase can be stable in the external field near $T_c$ . It consists of three collinear spin-density waves (see text). }\label{Fig3P} \end{figure} Importantly, here the in-plane $s$-component of the 3$Q$ as well as 1$Q$ structure appears only at $t > 3 \Lambda/2$ (see Appendix~\ref{AppendB} for the details). At lower $t$ the 1$S$ phase competes with the phase we dub 3$P$, which is the superposition of three collinear spin-density waves~\footnote{The corresponding spin structure is given by Eq.~\eqref{S3Q1} with all $s_j=0$, $p_1=p_2=p_3=p/\sqrt{3}$ and $\varphi_1+\varphi_2+\varphi_3 = 2 \pi n + \textrm{sign}(p) \pi/2$, see Fig.~\ref{Fig3P}.}. If we fix certain $t< 3 \Lambda/2$ and increase $h$ starting from $h=0$ we have sequence of phase transitions $1S \rightarrow 3P \rightarrow \text{PM}$. Both transitions are of the first order. At larger ``temperatures'' $t > 3 \Lambda/2$ (lower $T$), this sequence transforms into $1Q \rightarrow 3Q \rightarrow \text{PM}$. The former transition is always the first order one; however the latter can be either continuous or discontinuous. The reason is that in a small vicinity of $t=3 \Lambda/2$ the 3$Q$ phase is topologically-nontrivial in the whole range of fields till PM phase becomes the ground state. For yet larger $t$, before PM phase appears, the 3$Q$ phase becomes topologically trivial (either smoothly or discontinuously, see Appendix~\ref{AppendB}). \begin{figure} \centering \includegraphics[width=8cm]{phase2.pdf}\\ \caption{The same as in Fig.~\ref{FPhase1}, but for the system with collinear easy axes along $\mathbf{c}$ for all modulation vectors $\mathbf{k}_j$. Parameters~\eqref{param1} are used. Note, that the superposition of three collinear spin-density waves, 3$P$ phase (see Fig.~\ref{Fig3P}), appears.}\label{FPhase2} \end{figure} As a result, using parameters set~\eqref{param1} (note, that if we keep the same $\mathbf{k}_j$ as in previous part of the paper it implies single-ion easy-axis anisotropy with the constant equal to $\Lambda$, which makes $\mathbf{c}$ the easy direction) we obtain the phase diagram shown in Fig.~\ref{FPhase2}. The boundary between 1$S$ (1$Q$) and 3$P$ (3$Q$) is approximately given by \begin{eqnarray} t_{1S-3P} \approx 40 b(\chi h)^2, \end{eqnarray} whereas the boundary between 3$P$ and PM reads \begin{eqnarray} t_{3P-PM} \approx \frac{74}{15} b(\chi h)^2. \end{eqnarray} The 3$Q$ Skl -- 3$Q$ trivial boundary is approximately the previous equation continuation onto larger $t$: \begin{eqnarray} \label{tSkL2} t_{SkL} = \frac{\Lambda}{10} + \frac{203}{45} b (\chi h)^2. \end{eqnarray} Finally, the second order phase transition between 3$Q$ trivial and PM takes place at \begin{eqnarray} \label{t3QPM} t_h=\Lambda_h \leftrightarrow t = \Lambda + 2 b (\chi h)^2. \end{eqnarray} Presented above curves fix the generic type of phase diagrams which can be obtained by varying parameters of the system with the condition that $\mathbf{c}$ axis remains the easy one for modulated spin components. It is pertinent to make a connection with the paper~\cite{leonov2015} devoted to low temperatures and consider standard easy-plane and easy-axis anisotropies. In agreement with the results of Ref.~\cite{leonov2015} we find that the phase diagram for easy-plane anisotropy is trivial and consists only of XY and PM phases. The easy-axis case is more interesting. To analyze it we put $\Lambda = \Lambda^\prime=0.1$~K in the parameters set~\eqref{param1} and observe the phase diagram shown in Fig.~\ref{FPhase3}, which is similar with the one for dipolar forces and easy-axis anisotropy (see Fig.~\ref{FPhase2}) but with the conical XY phase neighboring to PM instead of 3$Q$ trivial one. Finally, we would like to point out that the complementary to proposed here theory for low-temperature part of the phase diagram is an interesting and challenging problem due to multi-harmonic skyrmion structure (see, e.g., Ref.~\cite{timofeev2021}) and long-range nature of the dipolar forces. \begin{figure} \centering \includegraphics[width=8cm]{phaseSIEA.pdf}\\ \caption{If one considers standard single-ion easy-axis anisotropy without dipolar forces, the conical phase becomes stable at large fields (see text), but the skyrmion lattice is the ground state in the intermediate fields range. In contrast, for easy-plane anisotropy the whole phase diagram is rather trivial, only XY and PM can be observed.}\label{FPhase3} \end{figure} \section{Conclusions} \label{Sconc} To conclude, we propose a simple analytical mean-field approach for skyrmion lattices in hexagonal frustrated antiferromagnets capable to describe high-temperature part of the phase diagram. We show, that dipolar forces (which are always present in real compounds) are sufficient to stabilize the SkL for the case of in-plane modulation vectors. We observe several generic types of phase diagrams and discuss the phase boundaries. One of the obtained phase diagrams can be relevant to the experimental observations in Gd$_2$PdSi$_3$~\cite{kurumaji2019SkL,hirschberger2020}. \begin{acknowledgments} We are grateful to V.A.\ Ukleev for valuable discussions. The reported study was funded by the Russian Federation President Grant No. MK-1366.2021.1.2. \end{acknowledgments}
{ "redpajama_set_name": "RedPajamaArXiv" }
9,034
Q: Handle window messages in a C# service I would like to capture workstation lock and unlock and user logon and logoff events. I already wrote a program which overrides the WndProc function, but this does not capture logon and logoff events (as the application is quit or not yet started when this event occurs). So I thought it might work using a service. I already read Receive Windows Messages in a Service, but I could not find a GetMessage() in C#. How do I accomplish reading Windows messages in a service using C#? BTW, I also tried the approach in Message pump in .NET Windows service, but I could not figure out how this fits into my problem. Also, the reference Microsoft link is not available any more... A: The Message pump in a .NET Windows Service article should be what you use. If you need a message pump you will also need a window handle that is receiving the messages. That article shows you how to create a Native Win32 window and how process the messages sent to it. What you are probably missing from that article is that you would just need to register for the MessageHandler.MessageReceived event that gets raised every time a new message comes in.
{ "redpajama_set_name": "RedPajamaStackExchange" }
7,750
\section{Introduction} With supermassive black holes being found at the centre of most galaxies \citep{1995ARA&A..33..581K}, interest in quasars has increased significantly, with substantial investigation into fundamental relations between black hole masses and their host galaxies' properties \citep{1998AJ....115.2285M, 2000ApJ...539L...9F, 2000ApJ...539L..13G, 2002ApJ...574..740T, 2007ApJ...655...77G}. In addition to these relations, statistical studies of the spatial clustering of quasars provide the potential to better understand the relation between quasars, their hosts and the underlying dark matter distribution, as well as estimate quasar lifetimes \citep[see, e.g.,][]{HaimanHui2001, MartiniWeinberg2001} across a relatively large range of redshift. For example, strong clustering would suggest quasars should reside in massive groups. If so, they should be rare and in order to reproduce the quasar luminosity density, they must have long lifetimes. Conversely, low correlation would suggest more common quasars, and thus shorter quasar lifetimes. Early studies of quasar clustering produced varying results for the clustering amplitude, with no clear agreement on overall evolution with redshift, some suggesting minimal or decreasing clustering evolution \citep{MoFang1993, CroomShanks1996}, while others found an increase in clustering with redshift \citep{Kundic1997, LaFranca1998}. These findings were generally poorly constrained due to the small sizes of available quasar samples. With the emergence of large scale surveys such as Sloan Digital Sky Survey \citep{2000AJ....120.1579Y} and the Two-degree Field QSO Redshift Survey \citep{2002MNRAS.333..279L}, substantially larger catalogs have been compiled, permitting more detailed investigation into the clustering properties of quasars, and many recent studies have been made into this area \citep[e.g.][]{LaFranca1998, Porciani2004, Croom2005, Shen2007, Myers2007, daAngela2008, Shen2009, Ross2009}. These recent studies have found evidence for an increase in clustering amplitude with redshift \citep{LaFranca1998, Porciani2004}, primarily for $z>2$, in agreement with predictions from simulations \citep[see, e.g.][]{Bonoli2009, Croton2009}. In addition to overall evolution, the luminosity dependence (if any) of large-scale clustering can provide significant insight into what quasar populations dominate different luminosity ranges. For example, the model of \citet{2005ApJ...630..705H, 2005ApJ...630..716H, 2005ApJ...632...81H, 2005ApJ...625L..71H, 2006ApJS..163....1H} suggests that bright and faint quasars are similar objects which are observed at different phases of their lifetimes, rather than being fundamentally different populations of quasars (as simpler, 'on-off' models assume). This model would suggest that both bright and faint quasars should populate similar halos. Thus, while there may be some correlation between peak luminosity and host halo mass, clustering dependence on instantaneous luminosity should be relatively weak, particularly when compared to more traditional 'on-off' models of quasar luminosity \citep{Lidz2006}. Recent observational studies have generally found a lack of luminosity dependence in the correlation function \citep[see, e.g.,][]{Croom2005, Myers2007, daAngela2008}, though \citet{Shen2009} found evidence for some, though weak, luminosity dependence. Several semi-analytic models have also been used, finding differing luminosity dependences, such as a significant dependence for sufficient luminosity ranges, but limited when considering only luminosities probed by observation \citep{Bonoli2009}, or weak dependence at low redshift ($z<1$), but stronger at higher redshift \citep{Croton2009}. In addition to large scale behavior, the possibility of excess quasar clustering on very small scales has arisen in several recent studies. While some observed quasar pairs are believed to be the result of gravitationally lensed quasars, it has been proposed that others may be physically distinct quasar binaries, which would suggest quasars cluster much more strongly on small scales than extrapolation of large scale clustering would imply \citep{Djorgovski1991, Hewett1998, Kochanek1999, Mortlock1999}, suggesting a connection between galaxy mergers and quasar activity \citep[see, e.g.][]{Kochanek1999}. However, investigating the smallest scale clustering has typically been problematic due to observational limitations (such as fiber collisions preventing small-separation pairs from being distinguished as distinct objects) and sample sizes insufficient for probing the smallest scales, where quasar pairs are rare. There have been several studies probing clustering at sub-Mpc scales, generally finding no excess clustering relative to an extrapolation of the large-scale clustering behavior \citep[see, e.g.][]{Shen2009b, Padmanabhan2009}. However, these studies have been limited to scales above 100 $\rm{kpc \: h^{-1}}$, while several recent studies have managed to probe even smaller scales, where they do indeed find a significant excess \citep{Hennawi2006, Myers2007II, Myers2008}. In particular, \citet{Hennawi2006} studied binary quasars from SDSS and 2dF Quasar Survey to compute quasar clustering for scales as small as 20 $\rm{kpc} \: h^{-1}$ (comoving), and found significant excess clustering relative to the large scale extrapolation (by an order of magnitude at comoving scales below 100 $\rm{kpc} \: h^{-1}$, and growing stronger with decreasing scale). This excess implies that the quasars are more strongly clustered than galaxies at these small scales, supporting the theory that quasar activity is triggered by galaxy interactions. Using the quasar sample from \citet{Myers2007}, \citet{Myers2007II} found only a slight excess in small-scale clustering, and put an upper limit for the excess at a factor of 4.3\underline{+}1.3 for physical scales of $\sim 28 \: \rm{kpc} \: h^{-1}$. They suggest that the significantly larger excess of \citet{Hennawi2006} is a result of a selection effect, possibly due to studies tending to target tracers of the Ly$\alpha$ forest, causing a bias toward $z > 2$, which may be more highly clustered. \citet{Myers2008} used a complete spectroscopic sample of quasars over physical scales of 23.7-29.9 $\rm{kpc} \: h^{-1}$ from SDSS to find an excess clustering factor of $\sim$4, consistent with the upper limit of \citet{Myers2007II}, which, while 2$\sigma$ below the excess found by \citet{Hennawi2006}, nonetheless supports the general finding of a clustering excess which may be a result of galaxy interactions. In this paper, we use cosmological hydrodynamic simulations which directly model the growth, accretion, and feedback processes of black holes to investigate the properties and underlying causes of black hole clustering. Although the simulation volume limits our analysis to black hole luminosities and host group masses below those typically studied, the self-consistent modeling of black holes allows us to study the clustering behavior without post-processing models. Additionally, the high resolution allows us to investigate clustering behavior at extremely small scales, well below those studied with semi-analytic models, thereby providing a means of using simulations to investigate the observed small-scale excess for the first time, and provide a physical explanation for the underlying cause. In Section 2 we describe the numerical modeling for the black holes formation and accretion (Section 2.1) the simulation parameters used (Section 2.2), the details of the subgroup finder (Section 2.3) and our method of calculating correlation functions (Section 2.4). In Section 3 we investigate the quasar clustering properties at both large and small scales, and we summarize our results in Section 4. \begin{figure*} \centering \includegraphics[width=14cm]{plots/temp4.eps} \caption{An example of the distribution of black holes in the simulations: The same slice ($2 \: \rm{Mpc} \: h^{-1}$ thick) through the D6 simulation at z=1,2,3,4. The positions of black holes in different luminosities bins ($L < 10^8 L_\odot$ - Orange; $10^8 L_\odot < L < 10^9 L_\odot$ - Pink; $10^9 L_\odot < L < 10^{10} L_\odot$ - Blue; $L > 10^{10} L_\odot$ - Green.) are plotted on top of the gas density distribution (shown in the the gray scale).} \label{simulationslice} \end{figure*} \section{Method} \subsection{Numerical simulation} In this study, we analyse the set of simulations published in \citet{DiMatteo2008}. Here we present a brief summary of the simulation code and the method used. We refer the reader to \citet{DiMatteo2008} for all details. The code we use is the massively parallel cosmological TreePM--SPH code {\small Gadget2} (Springel 2005), with the addition of a multi--phase modeling of the ISM, which allows treatment of star formation (Springel \& Hernquist 2003), and black hole accretion and associated feedback processes (Springel et al. 2005, Di Matteo et al. 2005). Black holes are simulated with collisionless particles that are created in newly emerging and resolved groups/galaxies. To find these groups, a friends--of--friends group finder is called at regular intervals on the fly (the time intervals are equally spaced in log $a$, with $\Delta \log{a} = \log{1.25}$), finding groups based on particle separations below a specified cutoff. Each of these groups that does not already contain a black hole is provided with one by turning its densest particle into a sink particle with a seed black hole of fixed mass, $ M = 5 \times 10^5 h^{-1}$\,M$_\odot$. After insertion, the black hole particle grows in mass via accretion of surrounding gas according to $\dot{M}_{\rm BH} = \frac {4 \pi G^2 M_{\rm BH}^2 \rho}{(c_s^2 + v^2)^{3/2}}$ \citep{1939PCPS...35..405H, 1944MNRAS.104..273B, 1952MNRAS.112..195B}, and by merging with other black holes. Note that within the simulations, it is assumed that accretion is limited to a maximum of 3 times the Eddington rate, although very few sources accrete above $\dot{M}_{Edd}$. The accretion rate of each black hole is used to compute the bolometric luminosity, $L = \eta \dot{M}_{\rm BH} c^2$ \citep{1973A&A....24..337S}. Here $\eta$ is the radiative efficiency, and it is fixed at 0.1 throughout the simulation and this analysis. Some coupling between the liberated luminosity and the surrounding gas is expected: in the simulation 5 per cent of the luminosity is (isotropically) deposited as thermal energy in the local black hole kernel, acting as a form of feedback energy \citep{2005Natur...433..604D}. \subsection{Simulation parameters} \begin{table} \caption{Numerical Parameters} \begin{tabular}{c c c c c c} \hline \hline Run & Boxsize & $N_p$ & $m_{\rm DM}$ & $m_{\rm gas}$ & $\epsilon$ \\ & $h^{-1} {\rm Mpc}$ & & $h^{-1} M_{\odot}$ & $h^{-1} M_{\odot}$ & $h^{-1} {\rm kpc}$ \\ \hline D6 & 33.75 & $2 \times 486^3$ & $2.75 \times 10^7$ & $4.24 \times 10^6$ & 2.73 \\ E6 & 50 & $2 \times 486^3$ & $7.85 \times 10^7$ & $1.21 \times 10^7$ & 4.12 \\ \hline \multicolumn{6}{l}{$N_p$: Total number of particles} \\ \multicolumn{6}{l}{$m_{\rm DM}$: Mass of dark matter particles} \\ \multicolumn{6}{l}{$m_{\rm gas}$: Initial mass of gas particles} \\ \multicolumn{6}{l}{$\epsilon$: Comoving gravitational softening length} \\ \end{tabular} \label{param} \end{table} Two simulation runs are analysed in this paper to allow for different volume size and resolution. The main parameters are listed in Table \ref{param}. Both runs were of moderate volume, with boxsizes of side length $33.75 h^{-1} {\rm Mpc}$ (D6 simulation), and $50 h^{-1} {\rm Mpc}$ (E6). For both simulations $N_p = $ $2 \times 486^3$ particles were used. The moderate boxsizes prevent the simulations from being run below $z\sim 1$ to keep the fundamental mode linear, but provide a large enough scale to produce statistically significant quasar populations. The limitation on the boxsizes is necessary to allow for appropriate resolution to carry out the subgrid physics in a converged regime (for further details on the simulation methods, parameters and convergence studies see \citet{DiMatteo2008}). \begin{figure*} \centering \includegraphics[width=12cm]{plots/bhhostrelation.ps} \caption{Relation between masses of dark matter halos and their most massive black holes. Color represents bolometric luminosity of the massive BH.} \label{BHHaloRelation} \end{figure*} \subsection{Subgroup finder algorithm} In addition to the on-the-fly friends-of-friends algorithm used to identify groups, a modified version of the SUBFIND algorithm \citep{Springel2001} was run on the FoF-identified groups to determine the component subgroups (\textit{i.e.} galaxies) within each group. These subgroups are defined as locally overdense, self-bound particle groups. To identify these regions, the algorithm sorts the particles within the parent group by density, and then analyzes each particle in order of decreasing density. For each particle \textit{i}, the density of the 32 nearest neighbors are checked. If none are denser than particle \textit{i}, it forms the basis for a new subgroup. If a single particle denser than \textit{i} is found, or if the closest two denser particles belong to the same subgroup, particle \textit{i} is assumed to be a member of that subgroup. If the two nearest particles denser than \textit{i} are members of different subgroups, these two subgroups are stored as subgroup candidates, and are then joined into a new subgroup also containing \textit{i}. After checking each particle in this manner, particles are checked for binding within their parent subgroup based on their position relative to the position of the most bound particle, and the velocity relative to the mean velocity of particles in the group. Any particle with positive total energy is considered unbound, and is removed from the subgroup, leaving the group divided up into its component subgroups (galaxies). \subsection{Correlation Function} To investigate the clustering properties of quasars, we use the two-point correlation function $\xi(r)$ \begin{equation} dP = \rho_0^2 [1+\xi (r)] dV_1 dV_2 \end{equation} \citep{Peacock1999}, where dP is the probability of finding one object in each volume element $dV_1$ and $dV_2$, separated by a distance r, with an average number density of $\rho_0$. We use the natural estimator $\xi(r) = \frac{DD}{RR} -1$ for computing $\xi$, where DD and RR are the number of pairs of objects found with separation r in the simulation (DD) and in a random distribution of equal spatial density (RR). For calculating RR, we used a random distribution of $N_R = 6 \times 10^5$ objects to find the number of pairs in a random sample, which is then normalized with a factor of $\left (\frac{N_{D}}{N_{R}} \right) ^2$ (where $N_D$ is the number of objects considered for the DD term) to correct for the increased spatial density of the random sources relative to the BHs in the DD term. Note that the estimator $\xi(r) = \frac{DD-2DR+RR}{RR}$ \citep{LandySzalay1993} has been shown to be more accurate (as it more effectively accounts for edge effects), but when considering small scales, both estimators provide equivalent results \citep{Kerscher2000}. Indeed, to confirm the validity of the natural estimator, we compared results between the natural estimator and the Landy and Szalay estimator, and found that for the largest scales ($> 5 \: \rm{h^{-1} \: Mpc}$) at low redshift, they differ by less than 5\%, and the discrepancy is well below 1\% everywhere else. \section{Results} To illustrate the distribution of quasars (as a function of their luminosity) with respect to the underlying matter distribution, in Figure \ref{simulationslice} we plot a slice through the D6 simulation at $z=1,2,3,4$, with black hole positions indicated by colored dots for four luminosity range bins: $L < 10^8 L_\odot$ - Orange; $10^8 L_\odot < L < 10^9 L_\odot$ - Pink; $10^9 L_\odot < L < 10^{10} L_\odot$ - Blue; $L > 10^{10} L_\odot$ - Green. As expected, as supermassive black holes are hosted by galaxies, the quasars (particularly the most luminous sources) are located in some of the densest regions, with low redshift tending to exhibit more BHs, though at generally fainter luminosities. To characterize the relation between black hole and host halo mass more precisely, in Figure \ref{BHHaloRelation} we show the relation between the group halo mass and the mass of its most massive (central) black hole, with color representing the respective (instantaneous) quasar luminosity. There is a correlation between halo mass and BH mass, and to a lesser extent between halo mass and BH luminosity, with large halos tending to host more massive, more luminous black holes than smaller halos, albeit with significant scatter. This is due to the lightcurve that a black hole has in our simulations \citep[regulated by the complex hydrodynamics, see e.g.][]{DiMatteo2008, DeGraf2010}. We also find that as redshift decreases, the simulation is more densely populated with BHs, which tend to be more massive and less luminous than at earlier redshift. To study the relation between black holes and other structures, in Figure \ref{simcompare} we show the correlation functions of black holes found in the D6 (solid black) and the E6 (solid pink) simulations for scales between $10 \: \rm{kpc \: h^{-1}}$ and $\sim 10 \: \rm{Mpc \: h^{-1}}$ at z=1, 3, 5, with Poisson error bars. Note, the results from the two simulations are very similar, with the higher resolution D6 simulation showing a small boost at small scales (below $\sim 200 \: \rm{kpc \: h^{-1}}$). In general, we see $\xi_{BH}$ typically takes the form of a power law (with some possible excess at small scales at $z=1$). We also divide $\xi_{\rm{BH,D6}}$ into two terms: a 1-halo term (dashed blue) produced by BH pairs occupying the same host group, and the 2-halo term (dashed green) produced by pairs occupying different groups. As expected, the 2-halo term dominates at large scales (above $\sim 300 \: \rm{kpc \: h^{-1}}$), while at smaller scales the 1-halo term dominates, indicating that our small scale clustering is really measuring BH properties within the scales of the host halos. A distinction between the 1-halo and 2-halo terms is expected (as BHs are hosted by galaxies within halos) and is consistent with the theoretical expectations \citep[see, e.g.][]{CooraySheth2002}, as well as what has been found in galaxy correlation functions \citep[see, e.g.][]{Magliocchetti2003, Zehavi2004}. \begin{figure} \centering \includegraphics[width=8cm]{plots/newsimcompare.ps} \caption{Two point correlation functions for the black holes in the D6 (solid black) and E6 (solid pink) simulations at z=1, 3, 5, with the 1-halo and 2-halo terms for the D6 simulation explicitly shown (dashed blue and green, respectively).} \label{simcompare} \end{figure} \subsection{Large Scale Clustering} It may be expected that black holes will cluster similarly to their host galaxies (within their halos). To investigate the relation between BH clustering and that of their host halos, in the left column of Figure~\ref{typicalhalo} we plot the 1-halo (blue) and 2-halo (red) contributions to the correlation function (at $z=1, \: 3, \: \rm{and} \: 5$) for BHs (solid lines) and galaxies (as identified by the subgroup finder described in Section 2.3) populating halos (\textit{i.e.} groups) in the specified mass ranges (dashed lines). These mass ranges were chosen to reproduce the closest agreement between $\xi_{BH}$ and $\xi_{subgroup}$ in the 2-halo regime at each redshift, so as to be used as an indicator of the typical halo mass for BH hosts (at each redshift). The same is shown in the right column of Figure~\ref{typicalhalo} where we only include some of the most luminous BHs in the simulations ($10^9 L_\odot < L_{\rm{BH}} < 10^{10} L_\odot$, a range which is probed by observations). \begin{figure*} \centering \includegraphics[width=15cm]{plots/typicalhalo.ps} \caption{Correlation functions for the D6 simulation BHs (solid) and subgroups within a specified mass range (dashed), at z=1, 3, 5, with 1-halo and 2-halo terms plotted separately (blue and red, respectively). The BH correlation function is plotted using all BHs (left) and using only those with $10^9 \: L_\odot < L_{\rm{BH}} < 10^{10} \: L_\odot$ (right). The mass range for $\xi_{\rm{group}}$ is chosen so as to find the closest agreement between $\xi_{\rm{BH,2h}}$ and $\xi_{\rm{group}}$. We also plot $\xi_{\rm{BH,1h}}$ using only BHs found in host groups in this fitted mass range (dot-dashed green line).} \label{typicalhalo} \end{figure*} For the full BH population, the typical host mass increases slightly with decreasing redshift, from $\sim 10^{11} M_{\odot}$ to somewhat below $10^{12} M_{\odot}$ from $z=5$ to $z=1$ respectively. When limited to the luminosity range $10^9 L_\odot < L < 10^{10} L_\odot$, we again find increasing host mass with decreasing redshift, but with a sharper increase up to masses a few times $10^{12} M_{\odot}$ at $z=1$ \citep[still in the faint end of the luminosity function, see][]{DeGraf2010}. We compare the typical host mass found in this way to the mean (median) mass of the host halos (see Table \ref{bhhosttable}) for several luminosity ranges, and find that the 2-halo clustering as described above does indeed provide an estimator for the mean host halo mass at the corresponding redshift in the simulations. In addition, the table shows that for a given halo mass the luminosity of its typical BH decreases with time, particularly at low redshift (below $z \sim 2-3$), as seen more generally in Figure \ref{BHHaloRelation}. This is shown explicitly in the bottom of Table \ref{bhhosttable}, where we calculate the mean and median BH luminosities found within groups of specified halo mass ranges. Note that the mean quasar luminosity actually peaks at $z = 3$ for massive ($M > 10^{12} M_\odot$) groups as a result of a few highly luminous sources. To better characterize the overall clustering strength, and in particular its luminosity dependence and evolution with redshift, we use the correlation length $r_0$, defined as the scale at which $\xi(r_0) = 1$ [which we calculate using a linear extrapolation of $\xi$]. In Figure \ref{corrlen} we plot $r_0$ versus $z$ for BHs in several luminosity bins (solid colored lines) and, for comparison, groups in several mass bins (dashed grey lines). In general we find a weak evolution of the quasar clustering with redshift. This can be simply explained by the evolution of the bias of its underlying host halo masses. In particular, the correlation length for luminous ($L > 10^9 L_\odot$) BHs tends to decrease slightly as a function of decreasing redshift until $z \sim 3$, following closely the bias of the $10^{11}-10^{12} M_\odot$ groups (consistent with the constraints on the host masses of these BHs). At fixed mass, these groups are less biased as a function of decreasing redshift \citep{MoWhite2002,Bahcall2004}. This is also in accord with our results from Figure \ref{typicalhalo}, that the typical host halo mass remains roughly constant for $z > 3$. For lower redshift (particularly $z < 2$), we instead see a significant upturn in $r_0$ versus $z$, corresponding to the increase in typical host halo mass, just as we found in Figure \ref{typicalhalo} and Table \ref{bhhosttable}. The lowest luminosity sources, however, show only minor change in $r_0$, corresponding to a host mass which changes only slightly with redshift (consistent with the median host masses found in Table \ref{bhhosttable}). This luminosity dependence is sufficiently weak (less than a factor of 2 increase in $r_0$ across several orders of magnitude in luminosity) to remain broadly consistent with the predictions from models that suggesting bright and faint quasars occupy similar halos \citep[e.g.][]{Lidz2006, Bonoli2009}. Indeed, our simulations produce complex lightcurves for our black holes, with luminosity varying rapidly across several orders of magnitude \citep[see, e.g.][]{DiMatteo2008, DeGraf2010}. This produces significant scatter in the relation between black hole luminosity and host mass, so general agreement with lightcurve-based models is expected (which are indeed motivated by simulations similar to our own). Nonetheless, as seen in Figure \ref{BHHaloRelation}, there remains some correlation between BH instantaneous luminosity and group mass, so a weak dependence on luminosity is expected even in this model. \begin{figure} \centering \includegraphics[width=8cm]{plots/corrlengroupcompare.ps} \caption{\textit{Solid lines}: Black hole correlation length as a function of redshift for several luminosity bins (colored lines). \textit{Grey dashed lines}: Group correlation length as a function of redshift for group mass ranges (from top to bottom) $>10^{12} M_\odot$, $10^{11}-10^{12} M_\odot$, $5 \times 10^{10}-5 \times 10^{11} M_\odot$, $10^{10}-10^{11} M_\odot$.} \label{corrlen} \end{figure} \subsection{Small Scale Clustering} Although we find that the 2-halo terms for BHs and subgroups (galaxies) can be easily matched to provide a good estimator for typical host mass, there is significant discrepancy between their respective 1-halo terms (Figure \ref{typicalhalo}, blue lines). The 1-halo BH correlation function is different both in shape and amplitude to the 1-halo term of galaxies, suggesting that, unlike at large scales, BHs do not cluster like their host galaxies on small scales. Or in other words, the distribution of BHs within halos does not follow closely that of their galaxies and hence does not trace the underlying matter distribution. In terms of amplitude, $\xi_{\rm{BH,1h}}$ can be adjusted by only considering the BHs in those groups that match the mass range constrained by the 2-halo term, thereby minimizing the suppression of $\xi_{\rm{BH,1h}}$ from the numerous BHs in groups too small to contribute to the 1-halo term (due to hosting only a single BH). As expected, in this case, (Figure \ref{typicalhalo}, green line) the amplitude increases and is more in agreement with the 1-halo term of the subgroups ($\xi_{\rm{subgroup,1h}}$; at least at z=1-3 where the statistics are good enough). \begin{figure} \centering \includegraphics[width=8cm]{plots/1halosubhalo.ps} \caption{\textit{Solid lines}: The 1-halo BH correlation function at z=1,2,3 divided into components from BH pairs occupying separate subhalos (red) or co-habitating a single subhalo (blue), using the full population of BHs. \textit{Dotted lines}: The 1-halo subgroup correlation function at z=1,2,3.} \label{1halo} \end{figure} It is, however, hard to account for the substantial difference in shape: $\xi_{\rm{BH,1h}}$ follows an approximate power law, lacking the decrease in slope at small scales (below $\sim 200-300 \: \rm{kpc} \: h^{-1}$) observed in $\xi_{\rm{subgroup,1h}}$ and expected from the 1-halo clustering produced by a general NFW profile \citep{NFW1996, CooraySheth2002, Zehavi2004}. Thus the BHs are distributed significantly differently than an NFW profile, showing a significant boost at small scales. We investigate the reason for this difference in the shape of the BH 1-halo term in terms of multiple BHs co-existing in a given subgroup. These BHs end up in a given subgroup as a result of mergers between their host galaxies, so that multiple BHs are expected to co-exist in a remnant (until dynamical friction is able to bring them close enough together to eventually merge). To understand the effect this has on the small scale clustering of BHs, we calculate the contributions to $\xi_{\rm{BH,1h}}$ from pairs of BHs occupying the same galaxy (we will call this the '1-subhalo' term) and from pairs of BHs occupying different galaxies within the same group ('2-subhalo' term), in analogy with dividing the overall correlation function into its 1-halo and 2-halo terms. We note that the existence of multiple BHs within a single subgroup necessarily indicates a previous merger event, since BH particles are not inserted into galaxies which already contain a BH particle, and thus any 1-subhalo contribution is inherently a result of previous galaxy mergers. \begin{figure} \centering \includegraphics[width=8cm]{plots/groupvssg.ps} \caption{The mass of each subgroup containing at least 2 BHs vs. the mass of its host group. Color indicates number of BHs within the given subgroup: black - 2 black holes; green - 3 black holes; blue - 4 black holes; pink - more than 4 black holes. Symbol indicates if the subgroup is the primary (\textit{i.e.} central) subgroup (circle), or a satellite subgroup (triangle). \textit{Dotted line}: Represents a one-to-one mass ratio provided for reference.} \label{groupvssg} \end{figure} \begin{figure} \centering \includegraphics[width=8cm]{plots/relbhmass.ps} \caption{The mass of the central (largest) BH within a multiply-occupied subgroup relative to the mass of the non-central BHs within the same subgroup. Color indicates the number of BHs contained within the given subgroup: black - 2 black holes; green - 3 black holes; blue - 4 black holes; pink - more than 4 black holes. \textit{Dotted line}: Represents a one-to-one mass ratio provided for reference.} \label{relativemass} \end{figure} In Figure \ref{1halo} we plot the 1-subhalo (solid blue) and 2-subhalo (solid red) components of $\xi_{\rm{BH,1h}}$, together with $\xi_{\rm{subgroup, 1h}}$ for subgroups in groups within the mass ranges listed in Figure \ref{typicalhalo} (dotted line). The 1-subhalo term does indeed have a steeper slope than the 2-subhalo term, and is most significant at small scales. The 1-subhalo term is most dominant at low redshift, and by $z=1$ it dominates the entire 1-halo term. This is a result of having increasingly large groups at low redshift which have also undergone a relatively large number of mergers. These indeed contain multiply-occupied subgroups (see Figure \ref{groupvssg}). We also find that, if restricted to BHs within the same host mass range as the subgroups, the 2-subhalo term of $\xi_{\rm{BH,1h}}$ matches $\xi_{\rm{subgroup,1h}}$ quite closely. Thus we find that, within sufficiently large groups (such that the simulation contains enough groups hosting multiple BHs to produce a well-defined 1-halo term), $\xi_{\rm{BH,1h}}$ has two distinct components: one due to BH pairs which occupy separate galaxies, exhibiting good agreement with $\xi_{\rm{subgroup,1h}}$; and a steeper one caused by BH pairs which co-occupy individual galaxies as a result of previous galaxy mergers, causing a boost in the small-scale $\xi_{\rm{BH,1h}}$, particularly evident at low redshift, where typical groups are largest and have undergone significant merging. In Figure \ref{groupvssg} we plot the relative mass of each multiply-occupied subgroup and its host group, with circles indicating central subgroups, and triangles showing satellite subgroups. We clearly see that these multiply-occupied subgroups tend to be the primary (central) subgroup within a given group, typically containing $\sim 65-70\%$ of the total group's mass. We also color-code the datapoints to show the number of BHs within each subgroup, and see that the central subgroup of larger groups tends to contain more BHs. To investigate the masses of BHs which populate these multiply-occupied subgroups, in Figure \ref{relativemass} we plot the mass of the largest (primary) black hole within a given subgroup relative to the masses of the other BHs in the same subgroup, color-coded to show the number of black holes within the subgroup. In only a few rare cases do we have more than one massive BH, while in the majority of cases we have, at most, a single massive BH with one or more smaller black holes, generally within an order of magnitude of the seed mass. This suggests that the majority of BHs in multiply-occupied subgroups come from relatively small satellite subgroups (hosting correspondingly small black holes) which have fallen in and merged with the large, central subgroup, but do not grow substantially, instead remaining much less massive than the primary BH in the galaxy. Additionally, we observe that over time the fraction of BHs in the simulation located within these multiply-occupied subgroups increases from 2\% at $z=5$ to 15\% at $z=1$, as typical groups get larger and have had more opportunity for satellite subgroups to merge with the central subgroup. This increase in typical group mass causes an increase in both the number of multiply-occupied subgroups, as well as an increase in the typical number of black holes found within them (as seen in Figure \ref{relativemass}), which produces the increased importance of the 1-subhalo term with decreasing redshift seen in Figure \ref{1halo}. We will compare the small scale clustering from the simulations to observations in Section 3.4. \begin{table*} \caption{Mean (median) halo mass of parent group and mean (median) luminosity of daughter BHs in D6 simulation. } \begin{tabular}{c c c c c c} \hline \hline & z=1 & z=2 & z=3 & z=4 & z=5 \\ \hline BH Luminosity & \multicolumn{5}{c}{Mean (Median) Group Mass [$10^{10} M_\odot$]} \\ All & 39.9 (10.1) & 24.2(9.07) & 19.3 (9.51) & 14.8 (8.34)& 12.6 (8.34)\\ $10^8 L_\odot< L_{\rm{BH}} < 10^9 L_\odot$ & 61.5 (18.7) & 27.2 (9.66) & 18.9 (8.80) & 13.1 (7.53) & 11.5 (7.12)\\ $10^9 L_\odot < L_{\rm{BH}} < 10^{10} L_\odot$ & 252 (94.1) & 54.9 (20.4) & 38.2 (21.1) & 25.5 (14.9) & 15.9 (10.3) \\ \hline \hline Group Mass & \multicolumn{5}{c}{Log(Mean (Median) BH Luminosity) [log($L_\odot$)]} \\ $M_{\rm{group}} < 10^{11} M_\odot$ & 7.88 (7.69) & 8.96 (8.55)& 8.99 (8.83)& 9.39 (9.25)& 9.36 (9.34)\\ $10^{11}M_\odot < M_{\rm{group}} < 10^{11.5} M_\odot$ & 8.66 (7.86)& 9.09 (8.76)& 9.39 (9.07)& 9.54 (9.31)& 9.71 (9.48)\\ $10^{11.5}M_\odot < M_{\rm{group}} < 10^{12} M_\odot$ & 9.09 (8.23)& 9.64 (9.19)& 9.90 (9.42)& 10.19 (9.64)& 10.65 (9.88)\\ $10^{12}M_\odot < M_{\rm{group}} < 10^{12.5} M_\odot$ & 9.45 (8.85)& 10.19 (9.81)& 11.16 (10.34)& 10.82 (10.66)& 10.92 (10.68)\\ $ 10^{12.5} M_\odot < M_{\rm{group}}$ & 10.49 (9.51)& 10.33 (10.20)& 12.40 (11.49)& 11.48 (11.54)& N/A\\ \hline \end{tabular} \label{bhhosttable} \end{table*} \subsection{Quasar Bias} To further characterize the clustering properties of BHs, we now consider the quasar bias as a function of scale and redshift. The bias is obtained by taking the square root of the ratio between $\xi_{\rm{BH}}$ and the DM correlation function (shown as dotted lines in Figure \ref{typicalhalo}). Based on our results of the small scale clustering, we expect the quasars to be strongly biased with respect to the DM distribution at small scales, particularly at high redshift. This general trend is clearly seen in Figure \ref{typicalhalo}, where $\xi_{\rm{DM}}$ (dotted lines) increases with time (due to gravitational collapse), while $\xi_{\rm{BH}}$ tends to decrease slightly (seen more clearly in Figure \ref{corrlen}). More importantly, we see that the BH clustering bias relative to that of DM is strongly scale-dependent, with $\xi_{\rm{BH}}$ exhibiting a significant increase in clustering at small scales (below $\sim 300 \: \rm{kpc \: h^{-1}}$) due to the strong 1-halo term, whereas $\xi_{\rm{DM}}$ shows only a slight increase at these small scales. \begin{figure} \centering \includegraphics[width=8cm]{plots/subgroupbias.ps} \caption{\textit{Top:} Solid lines: Black hole bias defined as $\sqrt{\xi_{\rm BH}/\xi_{\rm DM}}$, using only BHs occupying halos in the best-fitting mass ranges specified in Figure \ref{typicalhalo}. Dotted lines: Subgroup bias defined as $\sqrt{\xi_{\rm subgroup}/\xi_{\rm DM}}$, using only subgroups occupying halos in the best-fitting mass ranges specified in Figure \ref{typicalhalo}. \textit{Middle:} Bias of BHs relative to subgroups $\left (\sqrt{\xi_{\rm BH}/\xi_{\rm subgroup}} \right )$ occupying halos in the typical mass ranges found in Figure \ref{typicalhalo}. \textit{Bottom:} Bias of BHs relative to subgroups $\left (\sqrt{\xi_{\rm BH}/\xi_{\rm subgroup}} \right )$ occupying halos of mass $2-6 \times 10^{11} \: M_\odot$. } \label{bias} \end{figure} In the top of Figure \ref{bias} we plot the scale-dependent BH bias and subgroup bias (defined as $\sqrt{\xi_{\rm BH}/\xi_{\rm DM}} \: ; \sqrt{\xi_{\rm subgroup}/\xi_{\rm DM}}, \: \rm{respectively}$) found within the hosts of the best-fitting mass ranges found in Figure \ref{typicalhalo}. Here we see that the subgroup bias levels off (as did $\xi_{\rm{subgroup}}$ in Figures \ref{typicalhalo} and \ref{1halo}), but the 1-subhalo term causes the BH bias to continue increasing to the smallest scales probed in our simulation. To show this more clearly, the middle of Figure \ref{bias} shows the bias of BHs relative to the subgroups $\left (\sqrt{\xi_{\rm BH}/\xi_{\rm subgroup}} \right )$ for z=1-5. Within a given host mass range, the BHs cluster very similarly to the subgroups (galaxies), except at the smallest scales (below $\sim 100 \: \rm{kpc \: h^{-1}}$), where we again see the increased clustering caused by the multiply-occupied subgroups remaining from merger events, as discussed earlier. Although we note that this small-scale bias appears to be redshift dependent, it is actually a result of the evolution of the host mass being considered. At higher redshifts, the typical host mass is smaller, and thus fewer will have undergone subgroup mergers producing multiply-occupied subgroups (as confirmed in Figure \ref{groupvssg}), thereby making the small-scale boost less apparent. When considering behavior for a fixed group mass (as shown in the bottom of Figure \ref{bias}), we see that the bias between BH and subgroup clustering is redshift-independent, and consistently exhibits a strong small-scale boost from past subgroup mergers. \begin{figure*} \centering \includegraphics[width=18cm]{plots/projection.ps} \caption{\textit{Left:} The projected correlation function from the D6 simulation, averaged across redshifts 1-3, and across 3 projected directions for the full BH population (solid line), for BHs found within groups of the typical host mass shown in Figure \ref{typicalhalo} (dashed black line), for BHs found in groups of mass $4-8 \times 10^{11} M_\odot$ (dashed pink line), and for subgroups found in groups of mass $4-8 \times 10^{11} M_\odot$ (dotted pink line). We also plot the extension of the power law found in \citet{Porciani2004} (step function), and the observational results of \citet{Hennawi2006} (asterisks) and \citet{Myers2008} (triangle). \textit{Right:} Same as left plot, but with $\overline{W}_P (R_{\rm{min}}, R_{\rm{max}})$ plotted for several lower-limits on the host group mass.} \label{projectedxi} \end{figure*} \subsection{Comparison with observations: Projected Correlation Function} In order to compare with the observational constraints on the small scale clustering \citep[see][]{Hennawi2006, Myers2008}, we compute the volume-averaged projected correlation function $\overline{W}_P (R_{\rm{min}}, R_{\rm{max}})$. This projected correlation function is computed using the same estimator described in Section 2.4, but the separation between points is the projected separation onto the \textit{xy}, \textit{xz}, or \textit{yz} plane, rather than the separation in three-space. Although these three projections provide comparable results, we average across the three directions to avoid any potential directional bias. We then average across redshifts 1-3 (to match the observational data redshift range), weighted by the number of BHs at each redshift, and plot the result in Figure \ref{projectedxi}, together with the data from \citet{Hennawi2006} (asterisks), \citet{Myers2008} (triangle), and the extension of the best-fit power law for the large scale clustering found by \citet{Porciani2004} (step-function). We have also plotted the projected correlation function for subhalos found in our simulations for several host mass ranges (dotted lines). Figure \ref{projectedxi} shows a remarkable agreement between the small scale clustering of BHs from the simulations with the observations. In particular, when considering BHs within groups in the mass range of $4-8 \times 10^{11} M_{\odot}$ the small scale boost (magenta line) matches the observed clustering very well. For completeness we also show (dashed black line) the signal expected from BHs in the hosts of the typical mass ranges shown in Figure \ref{typicalhalo} which is also in good agreement, although slightly lower normalization. Indeed, the observed small-scale excess can be explained as resulting from the merger-based boost found in our simulations, further emphasizing the importance of such mergers on quasar evolution. We also note that if the full BH population from our simulation is used, rather than those in the restricted mass range, we lose the small scale excess (solid line), since the majority of our BHs are found in groups too small to exhibit significant effects of subgroup mergers. To investigate the dependence of the projected correlation function on the host mass in more detail, in the right of Figure \ref{projectedxi} we plot $\overline{W}_P (R_{\rm{min}}, R_{\rm{max}})$ for BHs hosted by groups with several different lower-mass cutoffs (from $1 \: \rm{to} \: 16 \times 10^{11} M_\odot$; colored lines), together with the observational data. Here we see that including less massive groups causes an overall decrease in amplitude (as expected), and also suppresses the small scale excess, as a result of smaller groups being less likely to host a multiply-occupied subgroup. This suggests that, given sufficient observational data, small-scale clustering may provide a sensitive means of probing the typical mass of merging pairs of galaxies hosting supermassive black holes. As shown, the curves with a lower mass cut of $\sim 4-8 \times 10^{11} M_\odot$ produce the best agreement with observation, implying that observed quasar pairs are typically located within groups of moderate size, comparable to those found within our simulation (and thus below the larger host masses typically associated with observed large-scale clustering). \section{Conclusions} In this paper we have investigated the clustering of black holes within hydrodynamic cosmological simulations, its redshift evolution, luminosity dependence, and particularly the small-scale behavior. We have shown that the large scale clustering of black holes traces that of the galaxies within their host groups, and provides a predictor of the typical host mass, which for our simulations is found to be on the order of a few $10^{11} M_\odot$. Although well below the typically found masses of $\sim 2 \times 10^{12}-10^{13} M_\odot$ \citep{Lidz2006,Ross2009,Bonoli2009, Shen2009}, this is consistent with our limited simulation volumes which can only follow the growth of the faint-end of quasar population (DeGraf et al. 2010), and cannot follow formation of such massive groups. The typical host group mass shows some evolution with redshift, most significant below $z \sim 3$, where typical host masses increase by up to a factor 10 (at $z=1$). This low-redshift increase is distinctly luminosity dependent, with the more luminous sources ($L_{\rm{BH}} > 10^9 L_\odot$) undergoing the most substantial increase in typical host mass. Overall the evolution of clustering with redshift and luminosity is minor and consistent with current observational constraints (albeit in low luminosity populations this is yet to be fully constrained). The relatively weak dependence found in our simulations is consistent with the complex lightcurves we derive from our direct modeling in which quasar luminosities vary over relatively short timescales for a given host (as regulated by hydrodynamical processes). This is also consistent with the models of \citet{Lidz2006}. In addition to the large-scale clustering (the 2-halo regime), our simulations allow us to study the small scale clustering (the 1-halo term) of $\xi_{\rm{BH}}$. We found that $\xi_{\rm{BH,1h}}$ follows a power law behavior all the way to the smallest scales. The clustering of black holes at small scale is unlike that of galaxies (or dark matter). We showed that the 1-halo BH term can be subdivided into two components: 1-subhalo and 2-subhalo. The 1-subhalo term, $\xi_{\rm{subgroup,1h}}$, represents the clustering of BHs within a galaxy and 2-subhalo that of BHs occupying different galaxies. We have shown that the 1-subhalo is the one that provides the power law behavior, indicating that galaxies do contain multiple black holes as a result of mergers. These galaxies tend to be the central galaxy within relatively large groups (for our simulation), generally hosting at most a single massive BH with one or more smaller BHs, likely as a result of smaller satellite galaxies merging with the large, central galaxy within the group. In the absence of these multiply-occupied galaxies, $\xi_{\rm{BH,1h}}$ and $\xi_{\rm{subgroup,1h}}$ exhibit very close agreement, but the inclusion of these merger remnants causes a significant boost in the small-scale BH clustering. This merger-based boost is most significant at low redshift, where typical group size is largest, though we find it in sufficiently massive groups at all redshifts. Though observational limitations make observing these scales difficult, several recent studies have found a small scale excess at scales below $\sim 100 \: \rm{kpc} \: h^{-1}$ \citep{Hennawi2006, Myers2008}. The observed excess is in remarkable agreement to the one predicted by our simulations coming from groups approaching $10^{12} M_\odot$, which host mostly intermediate size black holes. This suggests that multiple black holes co-occupying a subgroup at low redshifts are likely faint(ish) AGNs hosted in Milky Way size halos that have recently undergone merging. We also note that galaxies hosting multiple AGN \citep{Komossa2003, Gerke2007, Barth2008, Comerford2009b} or inspiralling supermassive black holes \citep{Comerford2009} have been found in recent studies, further supporting our conclusion of multiply-occupied subgroups. Although we leave more detailed investigation of the small scale BH pairs in our simulations (particularly with regard to the luminosities of inspiralling black holes) for a future work, we note that our finding that multiply-occupied galaxies tend to host a single massive BH with one or more small BHs appears to be in keeping with the observation that most of the inspiralling BH pairs power only a single AGN \citep{Comerford2009}. Given that, our agreement in small-scale merger-induced boost certainly reinforces the importance of galaxy mergers on the evolution of supermassive black holes. We also note this small-scale excess' sensitivity to the host mass suggests that future small-scale studies may provide a means to constrain the typical mass of merger events between galaxies hosting black holes, with current observational data combined with our simulations suggesting groups with typical masses comparable to those probed in our simulations (from a few $10^{11} M_\odot$ to $10^{12} M_\odot$) produce the multiply-occupied galaxies underlying the observed small scale excess. We would like to point out however that there are several aspect of our modeling approach, including numerical issues, in the simulations that potentially affect our results on the small-scale clustering. We have a very simplistic prescription to determine how BHs merge with one another (imposed by the limits on the resolution that can be achieved in these cosmological boxes). The current prescription has a BH pair merge when BHs are separated by less than their smoothing length and if the BHs relative velocity is small compared to the local sound speed. Changes to this prescription could accelerate (postpone) BH mergers, which would result in a suppression (increase) of our small scale clustering signals. It would be desirable to compare our results with other simulations which implement different prescriptions, or in the future to include more direct physical modeling of this region in higher resolution simulations. However, neither of these are currently possible. A numerical issue that may affect the results of our one-halo term is that black holes need to be fixed to potential minima (calculated among the neighboring particles within the smoothing length used for the accretion model) in order to avoid them leaving their subhalo due to numerical N-body noise (and the fact that dynamical friction is hard to calculate for sink particles). However, in some instances this may cause a BH particle in a small subhalo in orbit in a bigger group to 'hop' to the potential minimum of the larger group. This effect may be exacerbated in situations where the small subhalo may be stripped of gas by infalling into a larger one. These effects could artificially increase the number of BHs within large, central halos, thereby boosting small scale clustering. However, when we measure what fraction of BHs appear to 'hop' into the center of groups experiencing an unexpected jump in their position, we find that it is only $\sim 1-2\%$. Future simulations and comparison amongst different approaches (once they become available) should of course attempt to characterize these effects more specifically. We further note however, that observational studies have indeed found cases of galaxies hosting multiple BHs \citep{Comerford2009}, so the existence of a one-subhalo term is expected. Additionally, as seen in Figure \ref{projectedxi}, the projected clustering of subgroups has a fundamentally different form than the observed quasar clustering. Thus the BHs cannot simply trace their host subgroups/galaxies and still produce the observed small scale excess, but rather a significant one-subhalo term is required to produce the small scale power law behavior. In future work we also plan to simulate larger volumes (which we are starting to be feasible with the most advanced technology) to allow us to study clustering of AGN at larger (mass and length) scales while simultaneously investigating luminosity dependence for brighter sources more directly comparable to current and upcoming observational data, as well as providing increased statistics for the small scale clustering. \section*{Acknowledgments} This work was supported by the National Science Foundation, NSF Petapps, OCI-079212 and NSF AST-0607819. The simulations were carried out at the NSF Teragrid Pittsburgh Supercomputing Center (PSC). \bibliographystyle{mn2e}
{ "redpajama_set_name": "RedPajamaArXiv" }
8,260
Q: Azure Kubernetes Service- Get kubeconfig for non-admin AD app identity As per my understanding, Azure Kubernetes Service(AKS) allows getting credentials for admin and user identities. Can the user identity be an AD app or a managed identity? I'm writing .Net code. Can you provide some sample where we can get the user credentials from AKS cluster by using AD app credentials, assuming I have already done AD integration with my AKS cluster and have already assigned the appropriate role binding for my AD app? The security section here - https://learn.microsoft.com/en-us/rest/api/aks/managedclusters/getaccessprofile needs implicit flow. How does implicit flow work for AD app credentials? A: You can use Implicit grant flow to get access token. You'll need the Azure Kubernetes Service Cluster User built-in role to access an Azure AD enabled cluster. Get the user credentials to access the cluster: az aks get-credentials --resource-group myResourceGroup --name MyManagedCluster Or use List Cluster User Credentials API. POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential?api-version=2020-04-01 Because Get Access Profile API will be deprecated in the futhure.
{ "redpajama_set_name": "RedPajamaStackExchange" }
4,031
{"url":"https:\/\/scholarship.rice.edu\/browse?order=ASC&rpp=60&sort_by=1&etal=-1&offset=35868&type=title","text":"Now showing items 35869-35928 of 59780\n\n\u2022 #### Prairie and forest vegetation of the Armand Bayou Nature Center, Harris County, Texas \ufeff\n\n(1990)\nThe prairie and bordering woodlands of the Armand Bayou Nature Center, Harris County, Texas were sampled as an example of Texas Upper Coastal Prairie. The prairie is homogeneous and species-rich but shows very low dominance. ...\n\n(1857)\n\n(1850)\n\u2022 #### Prandtl-Meyer expansion of an ionizing monatomic gas \ufeff\n\n(1962)\nThe Prandtl-Meyer flow of a pure, monatomic gas, including the effects of ionization and recombination, has been numerically calculated. Expressions describing the thermodynamic state of the gas mixture were obtained from ...\n\u2022 #### Prandtl-Meyer expansion of ionized argon with differing electron and atom temperatures \ufeff\n\n(1965)\nThe sharp corner expansion of ionized argon with differing electron and atom temperatures has been calculated. The thermodynamic equations which apply for a two-temperature gas were derived. An energy balance on the electrons ...\n\u2022 #### Prayer \ufeff\n\n(1978-03-14)\n\u2022 #### Prayers and Politics \ufeff\n\n(1962-11-07)\n\u2022 #### PRAZAK QUARTET TUESDAY NOVEMBER 5, 2002 8:00 p.m. STUDE CONCERT HALL ALICE PRATT BROWN HALL RICE UNIVERSITY \ufeff\n\n(2002-11-05)\n\u2022 #### THE PRAZAK QUARTET Tuesday, October 16, 1990 8:00 P.M. Hamman Hall \ufeff\n\n(1990-10-16)\n\u2022 #### Pra\u017e\u00e1k Quartet Tuesday, November 10, 1998, 8:00 p.m. Stude Concert Hall \ufeff\n\n(1998-11-10)\n\u2022 #### PRE - LAW CLUB IS 'COMITIA CURIA' \ufeff\n\n(1958-10-17)\n\u2022 #### PRE - MEDS TO DISCUSS CANCER \ufeff\n\n(1958-11-14)\n\u2022 #### Pre Christmas Finals a Possibility; Senate Attempts to Revise Calendar \ufeff\n\n(1966-10-20)\n\u2022 #### Pre Law Group Sets First Meeting \ufeff\n\n(1960-11-11)\n\u2022 #### Pre Laws Discuss Court Organization Ethical Practices \ufeff\n\n(1961-01-11)\n\u2022 #### Pre-Christmas Finals \ufeff\n\n(1966-01-06)\n\u2022 #### A Pre-Clinical Framework for Neural Control of a Therapeutic Upper-Limb Exoskeleton \ufeff\n\n(2013)\nIn this paper, we summarize a novel approach to robotic rehabilitation that capitalizes on the benefits of patient intent and real-time assessment of impairment. Specifically, an upper-limb, physical human-robot interface ...\n\u2022 #### Pre-Easter Show Of Schorre Art Opens Wednesday In Rice Chapel \ufeff\n\n(1966-03-10)\n\u2022 #### PRE-LAW CLUB SETS MEETING \ufeff\n\n(1958-10-03)\n\u2022 #### Pre-Law Club To Be Formed \ufeff\n\n(1958-09-19)\n\u2022 #### Pre-Law Society Elects Officers Plans Discussions \ufeff\n\n(1960-12-02)\n\u2022 #### Pre-Laws Invited To Hear Official Of S M U School \ufeff\n\n(1961-02-17)\n\u2022 #### Pre-Med Society Meets Thursday \ufeff\n\n(1959-10-16)\n\u2022 #### Pre-Meds To Meet \ufeff\n\n(1961-03-17)\n\n(1953-10)\n\u2022 #### Pre-Tertiary stratigraphy, magmatism, and structural history of the Central Jackson Mountains, Humboldt County, Nevada \ufeff\n\n(1996)\nThe Jackson Mountains (JM) are part of the early Mesozoic continental arc in northwest Nevada, which was constructed upon previously accreted Paleozoic basement. The stratigraphy of the Paleozoic basement exposed in the ...\n\u2022 #### Preamble-based Symbol Timing Estimation for Wireless OFDM Systems \ufeff\n\n(2007-11-01)\nWe propose a timing estimation scheme that reduces computational complexity while achieving performance comparable to the autocorrelation method commonly employed at the wireless receiver. The proposed method is based on ...\n\u2022 #### Preamble-based Symbol Timing Estimation for Wireless OFDM Systems \ufeff\n\n(2007)\nWe propose a timing estimation scheme that reduces computational complexity while achieving performance comparable to the autocorrelation method commonly employed at the wireless receiver. The proposed method is based ...\n\u2022 #### Precambrian geology of part of the Little Llano River Valley, Llano and San Saba Counties, Texas \ufeff\n\n(1960)\nThis study was conducted for the purpose of contributing to the knowledge of the Precambrian history of the Llano Region in central Texas. Relatively little detailed information is available on the metamorphic rocks of the ...\n\u2022 #### Precedents To J.S. Bach\u2019s Fugues for Solo Violin from the Sonatas, BWV 1001, 1003, AND 1005 \ufeff\n\n(2010)\nJohann Sebastian\u2019s fugues for unaccompanied violin from the Sonatas, BWV 1001, 1003, and 1005, play a central role in the violin repertoire. Bach\u2019s conceptualization of the fugues for solo violin, an instrument that would ...\n\u2022 #### Precinct Activity Claims Attention of Rice Groups as Election Nears \ufeff\n\n(1964-10-29)\n\u2022 #### Precious Joy \ufeff\n\n(1982-03-30)\n\u2022 #### Precious Lord \ufeff\n\n(1980-04-13)\n\u2022 #### Precise atomic radiative lifetime via photoassociative spectroscopy of ultracold lithium \ufeff\n\n(1995)\nWe have obtained spectra of the high-lying vibrational levels of the 13\u03a3+g state of Li26 via photoassociation of ultracold Li6 atoms confined in a magneto-optical trap. The 13\u03a3+g state of the diatomic molecule correlates ...\n\u2022 #### Precise determination of the 2P radiative atomic lifetime of lithium using photoassociative spectroscopy \ufeff\n\n(1995)\nSpectroscopy of the high-lying vibrational levels of the $1\\sp3\\Sigma\\sbsp{g}{+}$ and $1\\sp1\\Sigma\\sbsp{u}{+}$ states of both $\\rm\\sp6Li\\sb2$ and $\\rm\\sp7Li\\sb2$ has been accomplished via photoassociation of ultracold ...\n\u2022 #### Precise determination of the mass of the Higgs boson and tests of compatibility of its couplings with the standard model predictions using proton collisions at 7 and 8TeV \ufeff\n\n(2015)\nProperties of the Higgs boson with mass near 125GeV are measured in proton-proton collisions with the CMS experiment at the LHC. Comprehensive sets of production and decay measurements are combined. The decay channels ...\n\u2022 #### Precise Optical Spectroscopy with Ion Traps \ufeff\n\n(1988)\nWe have used stored ion methods to improve resolution and sensitivity in optical spectroscopy. Single atomic ions have been confined by electric and magnetic fields, cooled by laser radiation pressure to temperatures on ...\n\u2022 #### Precise test of quantum jump theory \ufeff\n\n(1988)\nQuantum jumps due solely to spontaneous Raman scattering between the Zeeman sublevels of a single Mg+24 ion have been observed in the fluorescence emitted by the ion. A theory of quantum jumps for this system predicts that ...\n\u2022 #### Preconditioned iterative methods for inhomogeneous acoustic scattering applications \ufeff\n\n(2010)\nThis thesis develops and analyzes efficient iterative methods for solving discretizations of the Lippmann--Schwinger integral equation for inhomogeneous acoustic scattering. Analysis and numerical illustrations of the ...\n\u2022 #### Preconditioner schemes for elliptic saddle-point matrices based upon Jacobi multi-band polynomial matrices \ufeff\n\n(1995)\nSimulation of flow in porous media requires the numerical approximation of elliptic partial differential equations. Mixed finite element methods are frequently employed, because of local mass conservation and accurate ...\n\u2022 #### Preconditioning the integral formulation of the Helmholtz equation via deflation \ufeff\n\n(2006)\nIn this thesis we propose methods for preconditioning Krylov subspace methods for solving the integral equation formulation of the Helmholtz partial differential equation for modeling scattered waves. An advantage of using ...\n\n(1943-01)\n\n(1967)\n\n(1966)\n\u2022 #### Predicting internal cell fluxes at sub-optimal growth \ufeff\n\n(2015)\nBackground: Flux Balance Analysis (FBA) is a widely used tool to model metabolic behavior and cellular function. Applications of FBA span a breadth of research from synthetic engineering of biofuels to understanding ...\n\u2022 #### Predicting postinterview impressions from preinterview information: An examination of behavioral mediators \ufeff\n\n(1994)\nConsistent with previous findings, interviewers' postinterview evaluations of applicants for correction officer positions were positively related to preinterview information on the applicants. The interviewer's conduct of ...\n\u2022 #### Predicting Professional and Technical Performance among Medical Students: Personality, Cognitive Ability, and the Mediating Role of Knowledge \ufeff\n\n(2012)\nThe distinction between technical and contextual performance is widely recognized in the Industrial\/Organization Psychology literature (Sackett & Lievens, 2008). Less well-understood are the causal antecedents of performance ...\n\u2022 #### Predicting protein-protein interactions from primary structure \ufeff\n\n(2002)\nOne of the key challenges in the post-genomic era is to understand protein-protein interactions on a large scale. Given the primary structures of proteins and ligands, along with other information, how well can we ...\n\u2022 #### PREDICTING THE USABILITY OF ALPHANUMERIC DISPLAYS \ufeff\n\n(1984)\nA review of the literature on alphanumeric displays, especially computer-generated displays, suggests that four basic characteristics of display formats affect how well users can extract information from the displays: (1) ...\n\u2022 #### Predicting wind induced damage to residential structures: a machine learning approach \ufeff\n\n(2015-05-06)\nHurricane winds can cause significant physical damage to residential properties. Pre-storm prediction of wind damage risk allows residents and city emergency officials to plan actions to reduce loss of life and property. ...\n\n(1979-01)\n\u2022 #### Prediction of fatigue life in relation to surface finish parameters \ufeff\n\n(1989)\nOne can safely claim that not one single surface roughness parameter, in terms of completely characterizing a surface, can be exhaustive. This study is both an experimental and theoretical study of characterizing surface ...\n\u2022 #### Prediction of heart rate response to conclusion of the spontaneous breathing trial by fluctuation dissipation theory \ufeff\n\n(2013)\nThe non-equilibrium fluctuation dissipation theorem is applied to predict how critically ill patients respond to treatment, based upon data currently collected by standard hospital monitoring devices. This framework is ...\n\u2022 #### Prediction of magnetospheric parameters using artificial neural networks \ufeff\n\n(1994)\nArtificial neural network models have been developed that provide the magnetospheric parameters Dst, polar cap potential and the midnight equatorward boundary of diffuse aurora. Layered feedforward neural networks have ...\n\n(1966)\n\u2022 #### Prediction of the thermodynamic properties of associating polyatomic fluids \ufeff\n\n(1995)\nThermodynamic properties of associating polyatomic fluids are studied using molecular simulation and theory. The overall goal of this study was to develop a theory to predict the properties of fluid mixtures with intermolecular ...\n\u2022 #### Prediction Oriented Marker Selection (PROMISE) for High Dimensional Regression with Application to Personalized Medicine \ufeff\n\n(2015-10-27)\nIn personalized medicine, biomarkers are used to select therapies with the highest likelihood of success based on a patients individual biomarker profile. Two important goals of biomarker selection are to choose a small ...\n\u2022 #### Predictions \ufeff\n\n(1960-10-07)\n\u2022 #### Predictive energy landscapes for folding \u03b1-helical transmembrane proteins \ufeff\n\n(2014)\nWe explore the hypothesis that the folding landscapes of membrane proteins are funneled once the proteins' topology within the membrane is established. We extend a protein folding model, the associative memory, water-mediated, ...\n\u2022 #### Predictive Parallelization: A Framework for Reducing Tail Latencies of Web Search Queries \ufeff\n\n(2014-04-25)\nWe have become dependent on web search in our everyday lives. Web search services aim to provide fast responses to user queries, making the tail latency more important to reduce than the average latency. With modern multicore ...","date":"2017-02-27 13:45:13","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.29437926411628723, \"perplexity\": 8317.21600956146}, \"config\": {\"markdown_headings\": true, \"markdown_code\": false, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-09\/segments\/1487501172831.37\/warc\/CC-MAIN-20170219104612-00382-ip-10-171-10-108.ec2.internal.warc.gz\"}"}
null
null
Patelliella adusta es una especie de araña araneomorfa de la familia Micropholcommatidae. Es el único miembro del género monotípico Patelliella. Es originaria de la isla de Lord Howe al este de Australia. Se encuentra en el monte Gower y el monte Lidgbird. Referencias Enlaces externos Patelliella&searchType=simple&so=a0ION En ION Patelliella&selectall=Check+All&colname=on&colcategory=on&colauthority=on&colcomments=on&page=&vol= Nomenclator Zoologicus Micropholcommatidae
{ "redpajama_set_name": "RedPajamaWikipedia" }
8,132
\section{Introduction} \label{sec:Introduction} The calculation of dynamical quantities is essential for the interaction between theory and experiment. Most commonly, dynamical quantities such as the single-particle Green's function or optical absorption are considered in the linear response regime. In the frequency domain, the linear response of a wavefunction to a field can be written as the second derivative of a Lagrangian~\cite{mcweeny1992methods,helgaker2012recent} and frequency-domain response theory in quantum chemistry has closely followed the theory of analytic energy derivatives, similar to that in structural optimization. Thus algorithms exist to compute dynamical correlation functions from Hartree-Fock~\cite{dalgarno1966time}, density functional theory~\cite{casida1995response}, configuration interaction~\cite{koch1991analytical}, coupled cluster~\cite{koch1990coupled}, and Jastrow-Slater wavefunctions~\cite{mussard2017time,zhao2016equation} amongst others, using analytic derivative techniques. Dynamical quantities can also be calculated in the time-domain. Here, quantum chemical methods typically formulate the equation of motion for the wavefunction from the Dirac-Frenkel (time-dependent) variational principle~\cite{krause2007molecular,li2005time,hoodbhoy1978time}. Both kinds of algorithms can be found implemented in many modern quantum chemistry codes. Dynamical quantities have also been studied with density matrix renormalization group (DMRG) or matrix product state (MPS) wavefunctions. Here a wide range of numerical algorithms have been explored. In the frequency domain, the first dynamical correlation functions were computed in a fixed linear space of DMRG renormalized states (i.e. by optimizing a single tensor in the MPS)~\cite{hallberg1995density}. Subsequent algorithms, such as the dynamical DMRG (DDMRG)~\cite{JeckelmannPhysRevB2002,RamaseshaSynthMet1997,PatiPhysRevB1999,KuhnerPhysRevB1999} or analytic DMRG response theory~\cite{DorandoJChemPhys2009,NakataniJChemPhys2014}, further considered the response of the DMRG renormalized basis (i.e. all tensors in the MPS). DDMRG is widely used as a benchmark method for DMRG dynamical correlation functions, but unlike the analytical DMRG response theory does not correspond to a true derivative of a Lagrangian. The analytic DMRG response theory is equivalent to the later ``tangent space'' formulations of DMRG dynamical correlation functions~\cite{haegeman2013post}. Time-propagation has also been investigated in conjunction with DMRG wavefunctions. Although a wide variety of time-propagation algorithms have been discussed~\cite{CazalillaPhysRevLett2002,VidalPhysRevLett2003,DaleyJStatMec2004, FeiguinPhysRevB2005,WhitePhysRevLett2004,kinder2011analytic,haegeman2011time,ZaletelPhysRevB2015}, some, such as time-evolving block decimation~\cite{VidalPhysRevLett2003}, are specialized to Hamiltonians with short-range interactions on a 1D lattice. For quantum chemistry, it is necessary to work with long-range interactions, and one of the early time-dependent DMRG (td-DMRG) algorithms that supported such Hamiltonians was the time-step targeting time-dependent DMRG method~\cite{FeiguinPhysRevB2005}. There have also been many other important developments in time-dependent DMRG which we do not discuss here, including translating time-propagation algorithms such as Chebyshev expansion and Krylov space techniques to work with MPS~\cite{HolznerPhysRevB2011,GanahlPhysRevB2014,WolfPhysRevB2015}, analytic time-propagation using the time-dependent variational principle~\cite{kinder2011analytic,haegeman2011time}, and matrix product operator representations of the time-evolution operator with improved global time-step error~\cite{ZaletelPhysRevB2015}. In the current work, we explore frequency-dependent and time-dependent DMRG algorithms for dynamical quantities to better understand the behaviour and applicability of these algorithms in the ab initio DMRG context~\cite{WhitePhysRevLett1992,WhitePhysRevB1993,WhiteJChemPhys1999,DaulIntJQuantumChem2000, MitrushenkovJChemPhys2001,ChanJChemPhys2002,LegezaPhysRevB2003,ChanJChemPhys2004,SchollwockRevModPhys2005,MoritzJChemPhys2006,MartiJChemPhys2008, MartiZPhysChem2010,SchollwockAnnPhys2011,SharmaJChemPhys2012,WoutersEurPhysJD2014,OlivaresAmayaJChemPhys2015}. There has been relatively little work computing ab initio dynamical quantities with DMRG. Earlier work in our group compared dynamical DMRG and analytic DMRG response theory for computing frequency dependent polarizabilities~\cite{DorandoJChemPhys2009}. Subsequent investigations exploited the analogy between the analytic DMRG response theory and the random phase approximation to obtain DMRG excitation energies and RPA-like correlation energy contributions for some small molecules~\cite{NakataniJChemPhys2014}. To our knowledge, time-dependent DMRG techniques have not yet been explored with ab initio Hamiltonians, although some studies have been carried out with model Hamiltonians of conjugated systems~\cite{ma2009dynamical}. We will focus here on the dynamical DMRG (DDMRG) and time-step targeting time-dependent DMRG (td-DMRG) methods. We concentrate on these techniques rather than the analytic DMRG response or other time-dependent formulations for two reasons. First, DDMRG and td-DMRG are simple to implement in existing DMRG codes (and are thus commonly used in applications outside of quantum chemistry). Second, our work on analytic DMRG theories showed that the quality of the response functions is tied to the similarity between the excited states and the ground-state, thus excited states with quite different entanglement structure to the ground-state are poorly described except using large bond dimensions~\cite{NakataniJChemPhys2014}. Since the primary purpose of DMRG in quantum chemistry is to describe strongly correlated systems where we can often find states of different electronic character at low energies, it is of interest to work with techniques which treat states with different character in a relatively balanced way. This is the case with DDMRG and td-DMRG methods, which treat the response wavefunction or time-evolved state on an equal footing with the ground-state or initial state. In particular, we will introduce two small improvements to the techniques, that we call DDMRG$^{++}$ and td-DMRG$^{++}$. Although the change to the algorithms is small and easy to implement within existing DDMRG and td-DMRG codes, the subsequent improvement in accuracy and concomitant savings in cost is significant. The outline of the paper is as follows. In the section~\ref{sec:Theory} we give a brief overview of linear response theory dynamical correlation functions as well as frequency-dependent and time-dependent algorithms to compute Green's functions. We subsequently give some background on DMRG and MPS, before discussing the detailed theory of the DDMRG and td-DMRG algorithms, as well as their DDMRG$^{++}$ and td-DMRG$^{++}$ improvements. In section~\ref{sec:results} we benchmark DDMRG$^{++}$ and td-DMRG$^{++}$ on small systems which can be exactly treated by full configuration interaction. We next use DDMRG$^{++}$ to compute the O $1s$ core excitation energy of the water molecule in realistic basis sets. Finally, we use DDMRG$^{++}$ to compute the LDOS and gaps of hydrogen chains up to \ce{H_{50}} within a minimal basis, and further use td-DMRG$^{++}$ to obtain the complex polarization function to characterize the metallicity of the ground-state as a function of bond-length. We finish with some perspectives in section~\ref{sec:conclusions}. \section{Theoretical Methods} \label{sec:Theory} \subsection{Linear response} \label{sec:lin_resp} When the applied fields are not too strong, linear response theory underpins spectroscopy. We briefly recap the essentials here. Consider a system in an initial eigenstate $\Psi_0$ of a Hamiltonian $\hat{H}_0$, and consider a time-dependent perturbation $f(t) \hat{V}(t)$, where $f(t)$ is the field strength. The linear response of the observable $\hat{O}$ is given by \begin{equation}\label{eq:1_expec_var} \delta\langle\Psi_0|\hat{O}(t)|\Psi_0\rangle = \int_{-\infty}^{t}dt' \chi(t-t') f(t') \end{equation} where $\hat{O}(t) = e^{i\hat{H_0}t} \hat{O} e^{-i\hat{H_0}t}$ and the Kubo formula\cite{KuboJPhysSocJap1957} for the generalized susceptibility $\chi(t-t')$ is: \begin{equation}\label{eq:kubo} \chi(t-t')=-{i}\theta(t-t')\langle\Psi_0|[\hat{O}(t),\hat{V}(t')]|\Psi_0\rangle. \end{equation} The frequency dependent susceptibility is: \begin{eqnarray} \chi(\omega) &=& \int_{-\infty}^\infty d(t-t') e^{i\omega (t-t')}\chi(t-t')\nonumber\\ &=& \sum_m\frac{\langle\Psi_0|\hat{O}|\Psi_m\rangle\langle\Psi_m|\hat{V}|\Psi_0\rangle}{\omega-(E_m-E_0)+i\eta} -\sum_n\frac{\langle\Psi_0|\hat{V}|\Psi_n\rangle\langle\Psi_n|\hat{O}|\Psi_0\rangle}{\omega-(E_0-E_n)+i\eta},\label{eq:freq_susc} \end{eqnarray} where $\eta$ is a infinitesimal positive number, $\Psi_{m(n)}$ are excited states of the system, $E_{m(n)}$ are the associated eigenvalues. The imaginary part of the susceptibility is the spectral function, which is proportional to the rate of absorption of the applied field~\cite{ColemanBook2015}, \begin{equation} \label{eq:spectral} S(\omega)=-\frac{1}{\pi}\mathrm{Im}\chi(\omega). \end{equation} Different spectroscopies are described by different combinations of the operators $\hat{O}$ and $\hat{V}$. For example, optical spectroscopy is described by $\hat{O}, \hat{V} = \hat{\mu}$, where $\hat{\mu}$ is the dipole operator. Likewise, photoelectron spectroscopy can be described by the retarded Green's function, \begin{eqnarray} G^R_{ij}(t-t')= -i\theta(t-t')\langle\Psi_0^N|[a_i(t),a_j^\dagger(t')]_+|\Psi_0^N\rangle,\label{GFRdef} \end{eqnarray} where $\hat{O}, \hat{V} = a_i/a_j^\dagger$ respectively, $a_i^{(\dag)}$ are creation/annihilation operators, and $[\hat{A},\hat{B}]_+=\hat{A}\hat{B}+\hat{B}\hat{A}$ is the anticommutator. Its Lehmann representation reads \begin{eqnarray} G^R_{ij}(\omega) = \sum_m\frac{\langle\Psi_0^N|a_i|\Psi_m^{N+1}\rangle\langle\Psi_m^{N+1}|a_j^\dagger|\Psi_0^N\rangle} {\omega-(E_m^{N+1}-E_0^N)+i\eta} + \sum_n\frac{\langle\Psi_0^N|a_j^\dagger|\Psi_n^{N-1}\rangle\langle\Psi_n^{N-1}|a_i|\Psi_0^N\rangle} {\omega-(E_0^N-E_n^{N-1})+i\eta}.\label{GFR} \end{eqnarray} The spectral function or density of states (LDOS) becomes \begin{eqnarray} S_{ij}(\omega)&=&-\frac{1}{\pi}\mathrm{Im}G^R_{ij}(\omega)\nonumber\\ &=& \sum_m \langle\Psi_0^N|a_i|\Psi_m^{N+1}\rangle\langle\Psi_m^{N+1}|a_j^\dagger|\Psi_0^N\rangle \delta(\omega-(E_m^{N+1}-E_0^N))\nonumber\\ &+& \sum_n \langle\Psi_0^N|a_j^\dagger|\Psi_n^{N-1}\rangle\langle\Psi_n^{N-1}|a_i|\Psi_0^N\rangle \delta(\omega-(E_0^N-E_n^{N-1})). \end{eqnarray} In this work, we will focus on the Green's function and density of states as measured by photoelectron spectroscopy, but the formalism can easily be extended to other spectroscopies. \subsection{Frequency and time-domain calculations of Green's functions} \label{sec:general_gf} We can obtain equivalent information on the linear response in the frequency and in the time-domain. We now discuss general strategies to compute the Green's function in these two settings. Notice that the Green's function has two contributions, see Eq. \eqref{GFR}. The first part corresponds to the electron addition (EA) component of the Green's function, while the second part corresponds to the electron removal (IP) one. Computationally, we can compute the two pieces separately. Below we present explicit formulae only for the IP part, and analogous derivations apply to the EA part. Formally, the frequency ($\omega$)-dependent IP Green's function matrix element $G_{ij}(\omega)$ \eqref{GFR} can be rewritten as, \begin{equation}\label{eq:omegaGF} G_{ij}(\omega)=\langle\Psi_0|a_j^{\dagger}\frac{1}{\omega+\hat{H}_0-E_0+i\eta}a_i|\Psi_0\rangle. \end{equation} It is convenient to compute the Green's function from the response equation: \begin{equation}\label{eq:lin_eq_prob} [\hat{H}_0-E_0+\omega+i\eta]|c(\omega)\rangle = a_i|\Psi_0\rangle \end{equation} where $c(\omega)$ is referred to as the correction vector~\cite{PatiPhysRevB1999,KuhnerPhysRevB1999}, such that the Green's function element is the expectation value \begin{equation}\label{eq:GF_expec} G_{ij}(\omega)=\langle\Psi_0|a_j^{\dagger}|c(\omega)\rangle. \end{equation} Using real arithmetic, we solve for the real ($|X(\omega)\rangle=\mathrm{Re}|c(\omega)\rangle$) and imaginary parts ($|Y(\omega)\rangle=\mathrm{Im}|c(\omega)\rangle$) of the correction vector separately. To compute the imaginary part from the equation, \begin{equation}\label{eq:imag_c_eq0} [(\hat{H}_0-E_0+\omega)^2+\eta^2]|Y(\omega)\rangle=-\eta a_i|\Psi_0\rangle, \end{equation} we can in general minimize the Hylleraas-like functional~\cite{JeckelmannPhysRevB2002}, \begin{equation}\label{eq:imag_c_eq} \mathcal{L}[Y(\omega)]= \langle Y(\omega)|[(\hat{H}_0-E_0+\omega)^2+\eta^2]|Y(\omega)\rangle+2\eta\langle Y(\omega)| a_i|\Psi_0\rangle. \end{equation} From the imaginary part, the real part can be obtained as: \begin{equation}\label{eq:real_c_eq} |X(\omega)\rangle=-\frac{\hat{H}_0-E_0+\omega}{\eta}|Y(\omega)\rangle. \end{equation} In the time ($t$) domain the IP part of the Green's function \eqref{GFRdef} is written as: \begin{equation}\label{eq:final_timeGF} G_{ij}(t-t') = -i\theta(t-t')\langle\Psi_0|a_j^{\dagger}e^{i(\hat{H}-E_0)(t-t')}a_i|\Psi_0\rangle. \end{equation} The steady state Green's function is obtained at sufficiently long time $t \to \infty$. From this, the frequency dependent Green's function \eqref{eq:omegaGF} can be obtained by Fourier transform, \begin{equation}\label{eq:ft} G_{ij}(\omega) = \int_{-\infty}^{\infty} d(t-t') e^{i\omega (t-t')}G_{ij}(t-t'). \end{equation} Eq.~(\ref{eq:final_timeGF}) can be evaluated by a real-time propagation of an initial state ($a_i|\Psi_0\rangle$). There are many methods to carry out the time-propagation~\cite{VidalPhysRevLett2003,CazalillaPhysRevLett2002,DaleyJStatMec2004, FeiguinPhysRevB2005,WhitePhysRevLett2004,ZaletelPhysRevB2015}; in this work we use the simple Runge-Kutta (RK4) algorithm, which requires calculating four vectors: \begin{align}\label{eq:RK4_vectors} &|r_1\rangle = \tau(\hat{H}_0-E_0)|\Psi(t)\rangle\nonumber\\ &|r_2\rangle = \tau(\hat{H}_0-E_0)[|\Psi(t)\rangle+1/2|r_1\rangle]\nonumber\\ &|r_3\rangle = \tau(\hat{H}_0-E_0)[|\Psi(t)\rangle+1/2|r_2\rangle]\nonumber\\ &|r_4\rangle = \tau(\hat{H}_0-E_0)[|\Psi(t)\rangle+|r_3\rangle] \end{align} where $|\Psi(t)\rangle$ is the wavefunction at the initial time-step and $\tau$ is the time-step. From these four vectors the state at time $t+\tau$ can then be obtained as: \begin{equation}\label{eq:RK4_prop} |\Psi(t+\tau)\rangle \approx \frac{1}{6}[|r_1\rangle+2|r_2\rangle+2|r_3\rangle+|r_4\rangle]. \end{equation} The total accumulated time-step error is $O(\tau^4)$. We will next see how to translate these general expressions to compute Green's functions in the language of DMRG. \subsection{DMRG and MPS} To lay some foundations for the time-dependent algorithms, we recall the main ideas of DMRG and Matrix Product States (MPS). For details, the reader is referred to the recent reviews, see Refs.~\citenum{SchollwockAnnPhys2011,SzalayIntJQuantumChem2015} and \citenum{ChanJChemPhys2016}. The MPS is the underlying variational wavefunction ansatz used in DMRG algorithms, and is a non-linear parametrization for the wave function of the form: \begin{eqnarray}\label{FSMPS} \ket{\Psi} = \sum_{\{ n_k \}, \{\alpha_k\}} A^{n_1}_{\alpha_1}[1]A^{n_2}_{\alpha_1\alpha_2}[2]\cdots A^{n_K}_{\alpha_{K-1}}[K]\ket{n_1 n_2 \ldots n_K} \end{eqnarray} where $\ket{ n_1 n_2 \cdots n_K}$ is an occupation vector in the Fock space, and $A^{n_k}[k]$ is an $M \times M$ matrix of numbers, while $A^{n_1}[1]$ and $A^{n_K}[K]$ are $1\times M$ and $M\times 1$ vectors. For a given occupancy vector, the product of matrices (with vectors for the leftmost and rightmost sites) yields the scalar wavefunction amplitude. $M$ is the bond dimension (also known as the number of renormalized states) of the DMRG wavefunction. As $M \to \infty$ (or in a finite Fock space $\mathcal{F}$, $M \to \sqrt{\mathrm{dim}\mathcal{F}}$) the MPS becomes an exact representation of any state. In the most general sense, the DMRG algorithm provides a way to determine the tensors in the MPS one by one from $A^{n_1}[1]$ to $A^{n_K}[K]$ (holding all other tensors fixed at each step) from the variational principle, or equivalently the minimization of the Lagrangian, \begin{eqnarray} \mathcal{L}[\Psi]=\langle\Psi|\hat{H}|\Psi\rangle - E (\langle\Psi|\Psi\rangle-1).\label{LagE} \end{eqnarray} One such determination of all the tensors (going forwards and backwards) is called a \emph{sweep}. Note that the tensors are not unique because of the product form of the MPS; gauge matrices $G G^{-1}$ may be inserted in between the tensors while keeping the state invariant. To properly condition the optimization, when optimizing the $k$th tensor, we use the so-called mixed canonical gauge around site $k$: \begin{align}\label{eq:mixed} \Psi^{n_1n_2\cdots n_K} &=\sum_{\{\alpha_k\}} L^{n_1}_{\alpha_1}[1] \cdots L^{n_{k-1}}_{\alpha_{k-2}\alpha_{k-1}}[k-1] C^{n_k}_{\alpha_{k-1}\alpha_k}[k] R^{n_{k+1}}_{\alpha_k \alpha_{k+1}}[k+1] \cdots R^{n_K}_{\alpha_{K-1}}[K] \end{align} where the tensors to the left and right of $k$ satisfy the orthogonality conditions respectively: \begin{align}\label{eq:orthocond} \sum_{n_k} {L^{n_k}}^T L^{n_k} &=1 \nonumber\\ \sum_{n_k} {R^{n_k}} {R^{n_k}}^T &=1. \end{align} Because of the orthogonality conditions, the $L$ and $R$ tensors collectively define orthogonal sets of many-particle renormalized bases, recursively, \begin{eqnarray}\label{eq:rbasis} \ket{l_{\alpha_{k-1}}} &= &\sum_{ n_1 \cdots n_k } (L^{n_1}[1] L^{n_2}[2] \cdots L^{n_{k-1}}[k-1])_{\alpha_{k-1}} |n_1 \cdots n_{k-1}\rangle \nonumber\\ \ket{r_{\alpha_k}} &= &\sum_{ n_{k+1} \cdots n_K } (R^{n_{k+1}}[k+1] R^{n_{k+2}}[k+2] \cdots R^{n_K}[K])_{\alpha_k} |n_{k+1} \cdots n_K\rangle \end{eqnarray} and the MPS wavefunction may be equivalently written in the space of these renormalized states as: \begin{equation}\label{eq:dmrg_wf} |\Psi[k]\rangle = \sum_{\alpha_{k-1} n_k \alpha_k} C^{n_k}_{\alpha_{k-1} \alpha_k}[k] \ket{l_{\alpha_{k-1}} n_k r_{\alpha_k}}, \end{equation} where the symbol $[k]$ indicates that the wave function is in the mixed canonical form at site $k$. At each site in a DMRG sweep one performs several operations: constructing the renormalized bases and the renormalized operators in these bases at each site $k$ (\emph{blocking}); determining the site wavefunction $C^{n_k}_{\alpha_{k-1} \alpha_k}[k]$ (\emph{solving}); and transforming all quantities to the canonical form of the next site (\emph{decimation}). For example, in the ground-state DMRG algorithm, at each site $k$, we build the renormalized site Hamiltonian ($\hat{H}[k]$) by projecting the Hamiltonian ($\hat{H}$) into the renormalized basis of the site: \begin{equation}\label{eq:site_ham} \hat{H}[k] = P[k] \hat{H} P[k] \end{equation} where $P[k]=\sum_\alpha \ket{m[k]_\alpha} \bra{m[k]_\alpha}$ projects into the basis $\{ \ket{m[k]_\alpha} \} = \{ \ket{l_{\alpha_{k-1}} n_k r_{\alpha_k}} \}$. Then, Eq. \eqref{LagE} becomes a quadratic function in $C^{n_k}_{\alpha_{k-1} \alpha_k}[k]$. We then solve for the ground-state of $\hat{H}[k]$ through: \begin{equation} \label{eq:gs_dmrg} \hat{H}[k]|\Psi[k]\rangle = E|\Psi[k]\rangle, \end{equation} which amounts to a standard eigenvalue problem for $C^{n_k}_{\alpha_{k-1} \alpha_k}[k]$ in Eq. \eqref{eq:dmrg_wf}. The final step is to transform all quantities to the mixed canonical gauge at the neighbouring site. We do so by building the density matrix $\Gamma[k](C^{n_k}[k])$ in the blocked basis $\{\ket{l_{\alpha_{k-1}} n_k}\}$ with matrix elements: \begin{equation}\label{eq:densmat} \Gamma[k]_{{\alpha_{k-1}} n_k, {\alpha'_{k-1}}n_k'} = (C[k]C[k]^\dag)_{{\alpha_{k-1}} n_k, {\alpha'_{k-1}}n_k'}, \end{equation} where $C[k]$ is the reshaped matrix $C_{{\alpha_{k-1}}n_k,{\alpha_k}}[k]$ from the tensor $C^{n_k}_{\alpha_{k-1} \alpha_k}[k]$. The $M$ eigenvectors of the $\Gamma[k]$ with the largest eigenvalues form a matrix with elements $L[k]_{{\alpha_{k-1}} n_k, {\alpha_k}}$; when reshaped to $L[k]^{n_k}_{{\alpha_{k-1}}, {\alpha_k}}$ this becomes the tensor that replaces $C^{n_k}[k]$ in the MPS. A guess for the site-wavefunction at site $k+1$ can be obtained by transforming $C^{n_k}[k]$\cite{ChanJChemPhys2002}: \begin{equation}\label{eq:general_trans} C^{n_{k+1}}_{{\alpha_{k}}{\alpha_{k+1}}}[k+1] = \sum_{{\alpha'_{k}}} (L[k]^\dagger C[k])_{{\alpha_k}{\alpha'_k}} R^{n_{k+1}}_{{\alpha'_k}{\alpha_{k+1}}}[k+1], \end{equation} where both $L[k]$ and $C[k]$ are the matrix versions of the site tensors, respectively. In many DMRG algorithms, one is interested in simultaneously representing multiple states $\ket{\Psi_i}$ as matrix product states. It can be convenient computationally to constrain these MPS such that different states use the same renormalized bases at each site; then each state is distinguished only by its respective site wavefunction $C^{n_k}[k]_i$. Such algorithms are known as state-averaged algorithms. To construct the common renormalized bases at each site, one transforms bases from site to site via the ``state-averaged'' density matrix: \begin{equation}\label{stateave_densmat} \Gamma[k] = \sum_i w_i \Gamma[k]_i(C^{n_k}[k]_i) \end{equation} where $w_i$ are weights and $\Gamma[k]_i$ are the density matrices of the individual states entering into the average computed using Eq.~\eqref{eq:densmat}. In this case, the density matrix has more than $M$ non-zero eigenvalues and the transformation from site to site does not precisely preserve the states unless $M \to \infty$. For finite $M$ this requires choosing a site at which to compute observables. In our case, we report observables calculated at the middle of the sweep, although other choices are possible. Finally, we mention that in the following sections, the action of an operator $\hat{O}$ on an MPS $\hat{O}|\Psi_0\rangle$ will be frequently encountered (e.g. $a_i|\Psi_0\rangle$ on the right hand side of Eq. \eqref{eq:imag_c_eq0}). In certain cases, it is necessary to reduce the bond dimension of the state $\hat{O}|\Psi_0\rangle$, for example in the variational compression used in the benchmark td-DMRG(G) algorithm below, or if one needs to use a smaller bond dimension in the DDMRG$^{++}$ calculation than in the ground-state DMRG calculation. The reduction in bond dimension can in general be achieved via a variational compression by constructing the ``least-squares'' functional, \begin{eqnarray} \mathcal{L}[\Psi]=\langle\Psi-\hat{O}\Psi_0|\Psi-\hat{O}\Psi_0\rangle. \end{eqnarray} Similar to the minimization of Eq.~\eqref{LagE} for the ground state, the MPS representation $|\Psi\rangle$ for $\hat{O}|\Psi_0\rangle$ can be obtained by minimizing this functional using analogous DMRG sweeps. The only difference is that instead of solving an eigenvalue problem \eqref{eq:gs_dmrg}, a linear equation needs to be solved at each site $k$, whose solution in the mixed canonical form is simply given by the local projection $|\Psi[k]\rangle =P[k]\hat{O}|\Psi_0\rangle$. \subsection{DDMRG$^{++}$} \label{subsec:omegaDMRG} We now discuss how to determine the frequency-dependent Green's function using MPS and the dynamical DMRG (DDMRG) algorithm. As discussed earlier, the DDMRG algorithm has proven to be one of the most accurate methods to compute Green's functions and other frequency dependent correlation functions within a MPS representation. We earlier studied its performance for chemical problems in Ref.~\citenum{DorandoJChemPhys2009}. First, we recap the algorithm and then describe a modification to improve its formal properties and accuracy which we term DDMRG$^{++}$. The basic path to transcribe the equations in Sec.~\ref{sec:general_gf} into a DMRG algorithm is to translate each equation to the wavefunctions and operators at each site of the DMRG sweep. The states and operators are then expressed in the renormalized basis $\{ \ket{m[k]_\alpha} \}$ at site $k$. The simplest choice is to work with a state-averaged formalism, such that all MPS share the same renormalized basis at each site. In the standard DDMRG algorithm, we first solve equation~\eqref{eq:gs_dmrg} at site $k$ for the ground-state wavefunction $|\Psi_0[k]\rangle$. Then, we solve for the correction vector $|c[k]\rangle$ at each site, where in Eq.~(\ref{eq:imag_c_eq}) we additionally use the projected quantities $\hat{H}_0[k]$ and $a_k[k]|\Psi_0[k]\rangle$. Note that the Hylleraas functional of Eq.~(\ref{eq:imag_c_eq}) involves the square of the Hamiltonian operator, and $P[k] \hat{H}_0^2 P[k] \neq \hat{H}_0[k]^2$, but this approximation becomes exact in the limit $M \to \infty$. To ensure that all states continue to share the same renormalized basis throughout the sweep, we construct the density matrix for the decimation using equally weighted contributions from $|\Psi_0[k]\rangle$, $a_i^{(\dagger)}[k]|\Psi_0[k]\rangle$, $|X(\omega)[k]\rangle$, $|Y(\omega)[k]\rangle$. The accuracy of the DDMRG procedure is controlled by the bond dimension $M$. This governs the quality of the representation of the states such as $|\Psi_0[k]\rangle$ and $|c(\omega)[k]\rangle$, as well as the quality of the resolution of the identity approximation for $\hat{H}_0^2$. In a finite system, the imaginary factor $i\eta$ can be chosen arbitrarily, but a smaller $\eta$ leads to more iterations in minimizing the Hylleraas functional, and a larger bond dimension is needed to represent $|c(\omega)[k]\rangle$ accurately. Despite the established power of the DDMRG, there are a few drawbacks to the algorithm, some of which we discussed in Ref.~\citenum{DorandoJChemPhys2009}. These stem from the use of the state-averaged formalism, which means that some accuracy in the representation of each state is lost for a given bond dimension $M$. For example, the ground-state wavefunction in DDMRG for a given $M$ is less accurate than that obtained in the standard ground-state DMRG algorithm. A related side-effect is that even after completing a ground-state DMRG calculation, it is necessary to re-optimize the (worse) ground-state in DDMRG to accommodate the new renormalized basis. For these reasons, we have modified the original dynamical DMRG algorithm to avoid these problems; we term the modified algorithm, DDMRG$^{++}$. Roughly speaking, we allow each of the states appearing in the response equation to be an independent MPS (and thus to generate its own renormalized basis at each site $k$). More precisely, to avoid complex MPS tensors, we keep $|\Psi_0\rangle$, $a_i^{(\dagger)}|\Psi_0\rangle$ as independent MPS, and the pair $|X(\omega)\rangle$, $|Y(\omega)\rangle$ are represented within a common renormalized basis. This means that we can re-use the solution of a ground-state DMRG sweep as $|\Psi_0\rangle$ and there is no loss of accuracy in the ground-state representation during the DDMRG$^{++}$ sweeps. The modified DDMRG$^{++}$ scheme can be summarized as follows: \begin{itemize} \item A ground-state DMRG calculation is carried out to obtain $E_0$ and the MPS $|\Psi_0\rangle$. \item We compute a separate MPS, $a_i^{(\dagger)}|\Psi_0\rangle$. \item We carry out the DDMRG$^{++}$ sweep where we minimize the functional in Eq.~(\ref{eq:imag_c_eq}) at each site $k$ using the conjugate gradient algorithm. At site $k$, this gives the correction vectors $|X(\omega)[k]\rangle$, $|Y(\omega)[k]\rangle$. \item $|X(\omega)[k]\rangle$ and $|Y(\omega)[k]\rangle$ are averaged in the density matrix, which is used to transform all quantities to the next site in the sweep, and the sweeps are iterated until convergence. \end{itemize} \subsection{td-DMRG$^{++}$} \label{subsec:RTDMRG} The time-dependent DMRG (td-DMRG) algorithm that we will discuss was introduced by Feiguin and White and belongs to the family of adaptive time-dependent DMRG (td-DMRG) methods. It is based on the 4$^{th}$ order Runge Kutta (RK4) algorithm described in Sec.~\ref{sec:general_gf}. The advantage of this td-DMRG algorithm is that it is quite simple to implement for Hamiltonians with non-local interactions (as relevant for quantum chemistry) within a standard DMRG program. We first describe Feiguin and White's td-DMRG algorithm and then describe an improvement to this algorithm that we will call td-DMRG$^{++}$. As discussed, we can adapt the formalism in Sec.~\ref{sec:general_gf} to a DMRG algorithm by carrying out each step within the renormalized basis at each site. Again, the simplest procedure to implement is to use a state-averaged formalism, where all MPS appearing in the equations share the same renormalized basis $\{ \ket{m[k]_\alpha} \}$ at site $k$. Thus the four Runge-Kutta vectors in Eq.~\eqref{eq:RK4_vectors} become vectors in the space of site $k$, $|r_1[k]\rangle \ldots |r_4[k]\rangle$, and the Hamiltonian used to construct the vectors is $\hat{H}[k] = P[k] \hat{H} P[k]$. Note that higher powers of $\hat{H}$ are used in constructing the Runge-Kutta vectors. Similarly to as in DDMRG, we invoke the approximation: \begin{align} \label{eq:hpower} \hat{H}^n[k] &\approx \hat{H}[k]^n \end{align} which again, introduces an error which only vanishes in the limit of infinite bond dimension. The final consideration is the decimation step to transform from one site to the next. In td-DMRG, this is done by first computing wavefunctions at the intermediate times $t+1/3\tau$ and $t+2/3\tau$ using linear combinations of the $|r[k]\rangle$ vectors: \begin{align}\label{eq:RK4_interfunc} &|\Psi(t+\frac{1}{3}\tau)[k]\rangle\approx|\Psi(t)[k]\rangle+\frac{1}{162}[31|r_1[k]\rangle+14|r_2[k]\rangle+14|r_3[k]\rangle-5|r_4[k]\rangle]\nonumber\\ &|\Psi(t+\frac{2}{3}\tau)[k]\rangle\approx|\Psi(t)[k]\rangle+\frac{1}{81}[16|r_1[k]\rangle+20|r_2[k]\rangle+20|r_3[k]\rangle-2|r_4[k]\rangle]. \end{align} The density matrix used for the renormalization is the weighted average of all the (site) wavefunctions at different times: \begin{equation}\label{eq:ave_rdm} \Gamma[k] = w_1\Gamma (|\Psi(t)[k]\rangle ) + w_2\Gamma (|\Psi(t+\frac{1}{3}\tau)[k]\rangle ) + w_3\Gamma (|\Psi(t+\frac{2}{3}\tau[k]\rangle ) + w_4\Gamma (|\Psi(t+\tau)[k]\rangle ). \end{equation} Feiguin and White~\cite{FeiguinPhysRevB2005} found by experimentation that the choice of weights \begin{equation}\label{eq:weight} w_1=w_4=\frac{1}{3},\quad w_2=w_3=\frac{1}{6} \end{equation} gave the best convergence with bond dimension during the time-propagation. The accuracy of a td-DMRG simulation is controlled by the bond dimension $M$ as well as the time-step $\tau$ and total propagation time $T$. In general, it is found that as $T$ increases, the bond dimension needs to be increased to maintain accuracy in the wavefunction, due to the generic growth of entanglement during time evolution. Decreasing the time-step decreases the Runge-Kutta integration error, however, it also increases the number of DMRG sweeps and thus the number of compressions of the wavefunction which can also lead to an accumulated error.~\cite{FeiguinPhysRevB2005} Consequently, the time-step should be chosen to balance the intrinsic time-integration error with the error due to DMRG compressions. Similarly to DDMRG, the use of a state-averaged renormalized basis at each site introduces some undesirable errors into the td-DMRG algorithm. For example, the MPS $\ket{\Psi(t)}$ at the beginning of a time-step, represented in the renormalized basis at time $t$, becomes approximated by the renormalized basis at time $t+\tau$ at the end of the time-step, introducing an error in the representation of the initial state. Thus, we now consider a more accurate method, where states at different times are represented by independent MPS. In the most general extension, every state appearing in the Runge-Kutta scheme would be represented by its own independent MPS, i.e. $\ket{\Psi(t)}$, $\ket{\Psi(t+\tau)}$, and the Runge-Kutta vectors $\ket{r_1[k]} \ldots \ket{r_4[k]}$. Operations that increase the bond dimension of the MPS (e.g. when applying the Hamiltonian to construct the Runge-Kutta vectors, or adding the Runge-Kutta vectors to obtain $\ket{\Psi(t+\tau)})$ are then followed by variational MPS compression to the desired bond dimension. We call this scheme, which corresponds to the most direct implementation of time evolution with MPS in the Runge-Kutta context, td-DMRG(G), to denote the general extension. However, this scheme is significantly more expensive due to the many compression steps. A practical compromise is to retain only independent renormalized bases for $\ket{\Psi(t)}$ and $\ket{\Psi(t+\tau)}$, and to make use of approximations such as Eq.~(\ref{eq:hpower}) to reduce the cost. We call this method td-DMRG$^{++}$. In this case, we construct the four Runge-Kutta states as: \begin{align}\label{eq:RK4_vec_for_tddmrg++} &|r_1[k]\rangle = P[k](t+\tau) \tau(\hat{H}-E_0)P[k](t) |\Psi(t)[k]\rangle\nonumber\\ &|r_2[k]\rangle = P[k](t+\tau) \tau(\hat{H}-E_0) P[k](t+\tau) [|\Psi(t)[k]\rangle+1/2|r_1[k]\rangle]\nonumber\\ &|r_3[k]\rangle = P[k](t+\tau) \tau(\hat{H}-E_0) P[k](t+\tau) [|\Psi(t)[k]\rangle+1/2|r_2[k]\rangle]\nonumber\\ &|r_4[k]\rangle = P[k](t+\tau) \tau(\hat{H}-E_0)P[k](t+\tau) [|\Psi(t)[k]\rangle+|r_3[k]\rangle] \end{align} where $P[k](t)$ projects onto the renormalized basis of $\ket{\Psi(t)}$ at site $k$, and $P[k](t+\tau)$ projects onto the renormalized basis of $\ket{\Psi(t+\tau)}$ at site $k$. The two sets of renormalized bases $|m[k](t)\rangle$ and $|m[k](t+\tau)\rangle$ are transformed to site $k+1$ using the density matrices of $\ket{\Psi[k](t)}$ and $\ket{\Psi[k](t+\tau)}$ respectively. More precisely, we use the state average of the density matrices from the real and imaginary parts of the wavefunctions, to ensure that all tensors in the MPS are real. Note that if we carried out time-propagation using a first order time-step scheme (involving only the first Runge-Kutta vector $\ket{r_1[k]}$) then the above procedure is the same as td-DMRG(G), as $P[k](t) | \Psi(t)[k]\rangle$ introduces no error, and $P[k](t+\tau)$ can viewed as the variational MPS compression (up to the detail of averaging the real and imaginary wavefunction contributions to the density matrix). At the RK4 level, additional errors beyond td-DMRG(G) are introduced into the higher Runge-Kutta vectors. However, additional compressions are avoided by reusing the projected Hamiltonian $\hat{H}[k](t+\tau)$ to construct the additional vectors. Importantly, the cost of the td-DMRG$^{++}$ method is only a factor of two higher than the standard td-DMRG procedure of Feiguin and White for blocking and renormalization of the operators, but as we shall see in the following section, it gives rise to significant improvements in accuracy for a fixed bond dimension, allowing for time savings in practice. In summary, the td-DMRG$^{++}$ algorithm consists of: \begin{itemize} \item Carrying out ground-state DMRG to obtain $E_0$ and $|\Psi_0\rangle$. \item Computing the MPS for $a_i^{(\dagger)}|\Psi_0\rangle$. \item Propagating in real-time for a total time ($T$) as required for the desired accuracy in the spectrum. The propagation scheme consists of sweeps for each time-step. At each site $k$, we compute the four Runge-Kutta vectors using the site Hamiltonians $P[k](t+\tau) \hat{H} P[k](t)$ and $P[k](t+\tau) \hat{H} P[k](t+\tau)$ as in Eqs.~\eqref{eq:RK4_vec_for_tddmrg++}. We update the renormalized basis for $|\Psi(t+\tau)\rangle$ using the eigenvectors of the density matrix built from $|\Psi(t+\tau)\rangle$. Sweeps are carried out until convergence in $|\Psi(t+\tau)\rangle$ (typically 2-4 sweeps are sufficient). \item If desired, $G(t-t')$ is Fourier transformed using Eq.~\eqref{eq:ft} to obtain the frequency-dependent Green's function. \end{itemize} \section{Results and Discussion} \label{sec:results} \subsection{Benchmarking DDMRG$^{++}$ and td-DMRG$^{++}$} The DDMRG$^{++}$ and td-DMRG$^{++}$ algorithms above have been implemented inside the \textsc{Block} DMRG code.~\cite{ChanJChemPhys2002,ChanJChemPhys2004,GhoshJChemPhys2008,SharmaJChemPhys2012} We now examine the performance of the DDMRG$^{++}$ and td-DMRG$^{++}$ algorithms in the context of two simple systems where exact results can be computed. The first is a 10 atom equally spaced hydrogen chain at the equilibrium bond distance ($r = 1.8$~\ensuremath{a_0}\xspace (Bohr)) using a minimal STO-6G basis set.\cite{HehreJChemPhys1969} We shall return to the hydrogen chain problem in more detail in Section~\ref{subsec:hchains}. The second is an 8 site 1D Hubbard model with $U = 0.1t$. Except where otherwise stated, we will use spin-adapted implementations of the algorithms. We found that, similarly to ground-state simulations, spin-adaptation provides roughly a factor of two gain in the effective bond dimension (see Supplementary Material). Here we first analyze the performance of DDMRG$^{++}$ and td-DMRG$^{++}$ in the context of the \ce{H_{10}} hydrogen chain. Shown in Fig.~\ref{fig:h10_td_vs_omega} is the LDOS ($S_{ii}$) ($\eta=0.005$ a.u.) computed with FCI compared against DDMRG$^{++}$ and td-DMRG$^{++}$ ($\tau=0.1$ a.u., $T=1000$ a.u.). LDOS have been calculated in this case at the central site of the chain starting from converged DMRG calculations ($M$=500), and calculations are done in the L{\"o}wdin orthogonalized basis. To simplify visual comparisons only the IP part of the LDOS is presented here. \begin{figure}[!ht] \includegraphics[width=9cm,trim={1.0cm 0.5cm 2cm 1cm},clip]{./h10_ddmrg_rtdmrg_conf_new.pdf} \caption{\label{fig:h10_td_vs_omega} Dependence of the LDOS on bond dimension $M$ for a \ce{H_{10}} chain at $r = 1.8$~\ensuremath{a_0}\xspace. LDOSs at the central site using DDMRG$^{++}$ (upper panel) and td-DMRG$^{++}$ (lower panel). A broadening ($\eta$) of 0.005 a.u. has been used. For ease of visualization dots and lines are used to represent the same quantity (LDOS); different bond dimensions are represented by different colors. } \end{figure} From Fig.~\ref{fig:h10_td_vs_omega}, we see that both DDMRG$^{++}$ and td-DMRG$^{++}$ approach the reference FCI result as $M$ is increased towards the maximum value ($M$=100). However, DDMRG$^{++}$ converges much more quickly than td-DMRG$^{++}$ toward the exact result. In particular, DDMRG$^{++}$ is indistinguishable from FCI already at $M$=30, while td-DMRG$^{++}$ requires $M$=50-100 to reach the same accuracy. At $M$=30, the td-DMRG$^{++}$ spectrum also has small unphysical negative parts in the frequency region between -0.5 and -0.3 a.u.. The higher accuracy of the DDMRG$^{++}$ is to be expected given that the algorithm targets a single frequency at a time. Analyzing the computational cost of the two algorithms we have found, for the $\eta$ used, that the total cost of the DDMRG$^{++}$ and td-DMRG$^{++}$ calculations (i.e. over all frequencies and for the total propagation time) to reach a given accuracy is quite similar. However in many molecular applications, only a small range of frequencies is of interest. In that case DDMRG$^{++}$ is particularly efficient, as td-DMRG$^{++}$ computes the spectra over the whole frequency range. Further, the DDMRG$^{++}$ calculations can be carried out independently for each frequency point, allowing for easy parallelization. Both DDMRG$^{++}$ and td-DMRG$^{++}$ are evolutions of their parent algorithms because they do not restrict all MPS appearing in the equations to share the same state-averaged basis. We now examine the effect of this improvement. In Fig.~\ref{fig:h10_ddmrg_compare} we compare the DDMRG and DDMRG$^{++}$ algorithms for the 10 site hydrogen chain. \begin{figure}[!ht] \includegraphics[width=9cm,trim={1.0cm 0.0cm 2.0cm 1.cm},clip]{./h10_ddmrg_ddmrg++_conf.pdf} \caption{\label{fig:h10_ddmrg_compare} Comparison between DDMRG and DDMRG$^{++}$ in the description of the spectral function of an equally spaced 10 atom hydrogen chain near the equilibrium bond distance ($r = 1.8$~\ensuremath{a_0}\xspace). A broadening ($\eta$) equal to 0.005 a.u. has been used. } \end{figure} While both agree at larger bond dimension (as they must) for the smaller bond dimension ($M=30$) we see that the DDMRG$^{++}$ spectrum is significantly improved over the DDMRG spectrum, and in particular the DDMRG spectrum it oscillates, and this is a consequence of representing the ground-state wavefunction by an MPS in a state-averaged basis with only a small bond dimension. In contrast, even if we use an $M=30$ ground-state MPS in the DDMRG$^{++}$ algorithm, it has a consistent converged energy across the sweep which gives rise to a much more stable spectrum. \begin{figure}[!ht] \includegraphics[width=9cm,trim={1.0cm 0.0cm 2cm 1cm},clip]{./h10_rtdmrg_newcode.pdf} \caption{\label{fig:h10_rtdmrg} Comparison between td-DMRG and td-DMRG$^{++}$ in the description of the spectral function of an equally spaced 10 sites hydrogen chain at the equilibrium bond distance ($r = 1.8$~\ensuremath{a_0}\xspace). A broadening ($\eta$) equal to 0.005 a.u. has been used. } \end{figure} In Fig.~\ref{fig:h10_rtdmrg} we compare the td-DMRG and td-DMRG$^{++}$ algorithms for the 10 site hydrogen chain (\ce{H_{10}}). We see that the $M=30$ td-DMRG$^{++}$ calculation is comparable in accuracy, if not better than, the $M=50$ td-DMRG calculation. In both the DDMRG$^{++}$ and td-DMRG$^{++}$ cases, the cost of the calculations for fixed bond dimension is roughly twice the cost of the original DDMRG and td-DMRG algorithm. On the other hand, the effective bond dimension in DDMRG$^{++}$ and td-DMRG$^{++}$ appears to be close to twice that in DDMRG and td-DMRG respectively. Given that the scaling with bond dimension is like $M^3$, we see that the DDMRG$^{++}$ and td-DMRG$^{++}$ algorithms offer significant savings in practice. Additional understanding of the behaviour of td-DMRG$^{++}$ can be obtained comparing the time-dependent Green's function matrix elements ($G_{00}(t)$ in this case) calculated with td-DMRG, td-DMRG$^{++}$, and td-DMRG(G) using $M=30$ with both a linear propagator, and the 4th order Runge-Kutta propagator. Because of the cost of the td-DMRG(G) algorithm, which requires variational MPS compression at each time step, we performed comparisons for the simpler case of the 8-site Hubbard chain. Plots of the errors calculated against the exact FCI propagation are presented in Fig.~\ref{fig:Hub_MPO_time_diffmet}. \begin{figure*}[!ht] \centering \includegraphics[width=9cm,trim={9cm 2cm 22cm 0cm}]{./hubbard_8Sites_U01_site1_timesignal_conf_diffmethods_new_diffFCI_noweight.pdf} \caption{\label{fig:Hub_MPO_time_diffmet} Errors of td-DMRG, td-DMRG$^{++}$ and td-DMRG(G) in the estimation of the $G_{00}(t)$ matrix element of a 8-site Hubbard chain with respect to the exact FCI propagation. Results obtained using the linear propagator and the 4th order Runge-Kutta (RK4) scheme are presented in panel $a$ and $b$ respectively. In this plot different colors refer to different methods and solid and dashed lines are used to represent the real and imaginary parts of $G_{00}(t)$ respectively. } \end{figure*} The td-DMRG(G) calculations were carried out with a general purpose MPO/MPS library without spin-adaptation~\cite{LiJChemTheoryComput2017}, and thus all calculations in the figure did not use spin adaptation. We see that both with the linear propagator and the 4th order propagator, the use of more flexible renormalized bases in td-DMRG$^{++}$ and td-DMRG(G) significantly increases the accuracy of the propagation over the simple td-DMRG scheme. In particular, td-DMRG$^{++}$ roughly allows for a doubling of the propagation time over td-DMRG before a noticeable buildup of error occurs, while td-DMRG(G) allows for a further doubling. In the case of the linear propagator, the only difference in principle between td-DMRG$^{++}$ and td-DMRG(G) is the use of the real and imaginary averaged density matrix to determine the renormalized bases (compression) for the wavefunction at the next time-step (first case), rather than the exact MPS variational compression algorithm (latter method),\footnote{A single complex density matrix is used in td-DMRG(G) during the compression step.} and this is responsible for the difference in accuracy. In the case of the 4th order propagation scheme, td-DMRG(G) provides an accurate representation of all the Runge-Kutta vectors. This leads to an extremely stable propagation, but at the cost of a significantly larger number of compression steps (6 more compressions per time step). Based on this analysis, we can conclude that td-DMRG$^{++}$ provides a good compromise between accuracy in the representation of the Runge-Kutta vectors, and efficiency in practice, when carrying out real-time propagation. Note that the error due to finite $T$ is smaller than the other errors analyzed in this section and thus we have not discussed it in detail. A more detailed analysis of the errors associated with the time-step $\tau$ is presented in the supplementary material. \subsection{Core-ionization potential of \ce{H_2O}} \label{subsec:h2o} As a chemical application of the methods developed here we now consider the calculation of a core-ionization potential. Core spectra are generally challenging to simulate as they need a flexible treatment of electron correlation as well as the inclusion of relativistic effects~\cite{CorianiJChemPhys2015, DuttaJChemTheoryComput2015,WenzelJComputChem2015,BradecJChemPhys2012}. Here, we use DDMRG$^{++}$ to calculate the ionization potential (IP) for the deepest core orbital (O $1s$) of water examining the basis set effects and the effects of relativity. We compare against coupled cluster calculations~\cite{DuttaJChemTheoryComput2015,CorianiJChemPhys2015}, as well as experimental reference values in Table~\ref{tab:h2o_ip}. \begin{table*}[!ht] \caption{\label{tab:h2o_ip} \ce{H_2O} core ionization potentials (eV). Theoretical data have been calculated at the geometry of Ref.~\citenum{SenMolPhys2013}.} \begin{threeparttable} {\footnotesize \begin{tabular}{l@{\hskip .2in}c@{\hskip .2in}c@{\hskip .2in}c@{\hskip .2in}c@{\hskip .2in}c@{\hskip .2in}r} \hline \hline &CVS- &EOM- &EOM- &$\Delta$UGA- & & \\ Basis &CCSD\tnote{a} &CCSD &CCSD(2)$^*$\tnote{c} &SUMRCC\tnote{b} &DDMRG$^{++}$ &Exp.\tnote{d} \\ \hline cc-pVDZ &543.34 &543.27\tnote{b} & &541.97 &542.13 &539.78 \\ cc-pVTZ &540.68 &540.66\tnote{b} & &539.02 &539.62 & \\ cc-pVQZ & & & & &539.73 & \\ cc-pCVDZ & &542.69\tnote{c} &541.17 & &541.30 & \\ cc-pCVTZ &541.15 &541.13\tnote{c} &540.03 & &540.10 & \\ cc-pVDZ-DK\tnote{$\Diamond$} & & & & &542.53 & \\ cc-pVTZ-DK\tnote{$\Diamond$} & & & & &539.96 & \\ cc-pVQZ-DK\tnote{$\Diamond$} & & & & &540.16 & \\ \hline \hline \end{tabular} \begin{tablenotes} \item[$\Diamond$] Scalar relativistic effects have been introduced using the sf-X2C method.\cite{LiuMolPhys2010,SaueChemPhysChem2011,PengTheoChemAcc2012} \item[a] Data from Ref.~\citenum{CorianiJChemPhys2016,CorianiJChemPhys2015} \item[b] Data from Ref.~\citenum{SenMolPhys2013} \item[c] Data from Ref.~\citenum{DuttaJChemTheoryComput2015} \item[d] Data from Ref.~\citenum{OhtsukaJChemPhys2006} \end{tablenotes} } \end{threeparttable} \end{table*} We estimate the IP from a DDMRG$^{++}$ calculation by fitting three points around the excitation peak with a parabola and extracting the position of the maximum. We used an $\omega$ grid of 0.01 hartree and an $\eta$ value of 0.05 hartree. We used a bond dimension large enough to converge the DMRG energy below the milliHartree (\ensuremath{mE_h}\xspace) level ($M$=1000 for DZ basis sets and $M$=2000 for TZ and QZ basis sets), while a bond dimension $M$=500 has been used in DDMRG$^{++}$ to represent the $a_i|\psi_0\rangle$ and $|c(\omega)\rangle$ wave functions. Calculations using smaller bond dimensions in the cc-pVQZ basis indicate that our IP results are converged to better than 0.1 eV. Smaller errors are expected for the smaller basis sets. Overall, our computed IP's are in general agreement with previous theoretical results and, if we use a basis set larger than double zeta (DZ), they are in good agreement with the experimental value as well. As noted above, relativistic effects are important for this quantity. Four component relativistic DMRG calculations have previously been reported in {Ref.~\citenum{KnechtJChemPhys2014}}; here we estimate scalar relativistic corrections through the sf-X2C Hamiltonian.~\cite{LiuMolPhys2010,SaueChemPhysChem2011,PengTheoChemAcc2012} The inclusion of scalar relativistic effects increases the IP by 0.35-0.4 eV. The final result in the largest cc-pVQZ basis including scalar relativistic effects is within 0.4 eV of the experimental value. The core-valence basis sets shift the ionization potential by a similar amount but with a different sign at the DZ and TZ level. The DDMRG$^{++}$ calculations allow for an assessment of correlation effects beyond those treated in earlier methods. Comparing to the EOM-CCSD and CVS-CCSD results, we find that the correlation effects beyond doubles amount to approximately 1 eV in the IP. Interestingly, the EOM-CCSD(2)* method recently developed by Dutta et al\cite{DuttaJChemTheoryComput2015} performs very well, with errors of roughly 0.1 eV. MRCC ($\Delta$UGA-SUMRCC) calculations, as performed by Sen et al in Ref.~\citenum{SenMolPhys2013} also improve on the EOM-CCSD results. \subsection{Hydrogen Chains} \label{subsec:hchains} We now use the methods developed in this work to study longer hydrogen chains. 1D equally spaced hydrogen chains were introduced in Ref.~\citenum{HachmannJChemPhys2006} as a simple model for strong correlation in an ab initio system, with the tuning parameter being the spacing between the atoms (here denoted $r$). They have since become a popular model system on which to benchmark strong correlation methods~\cite{StellaPhysRevB2011,TsuchimochiJChemPhys2009, LinPhysRevLett2011,SinitskiyJChemPhys2010,MazziottiPhysRevLett2011,MottaHChain1ArXiv2017}, and have also spawned the study of analogous ring systems with heavier atoms~\cite{FertittaPhysRevB2014,wouters2016practical}. In the thermodynamic limit, the chains are thought to undergo a metal-insulator transition with the metallic phase being found at short bond distances and a Mott insulator found at long distances. 1D hydrogen chains also serve as a dimensionally reduced setting to study the hydrogen phase diagram, which is of particular interest in understanding the high pressure interiors of planets such as Jupiter and Saturn. The metal-insulator transition in hydrogen chains can be identified in terms of different observables. Direct evidence can be obtained by computing the bandgap in the thermodynamic limit, which must vanish for a metal. Alternatively, ground-state correlation functions can be computed. For a 1D system, the delocalization of the electrons associated with the metallic phase can be established by the vanishing of the many-body complex polarization function~\cite{RestaRevModPhys1994,RestaPhysRevLett1998,StellaPhysRevB2011,HineJPhysCondensedMatter2007}. Also, the algebraic decay of the off-diagonal elements of the single-particle density matrix can also be used to establish the metallic phase~\cite{HachmannJChemPhys2006}. This latter criterion was used in earlier DMRG studies to characterize the metallicity of hydrogen chains at different bond lengths~{\cite{HachmannJChemPhys2006}. Here we use the DDMRG$^{++}$ and td-DMRG$^{++}$ algorithms to calculate the LDOS and the complex polarization function respectively as measures of metallicity, as a function of bond length for three different hydrogen chains in the minimal STO-6G basis set~\cite{HehreJChemPhys1969} with open (OBC) and periodic boundary conditions (PBC). We also carry out ground-state DMRG and restricted and unrestricted Hartree-Fock calculations to further support the results. All DMRG calculations are carried out with localized L\"owdin orthogonalized atomic orbitals, and LDOS are presented at one of the (two) central atoms of the chain. The PBC Hamiltonian is defined using a periodic Coulomb interaction only along the chain (1D periodicity). In Fig.~\ref{fig:hchains_diffdist} we present the DDMRG$^{++}$ LDOS at three bond distances, $r=1.4, 1.8, 3.6\, \ensuremath{a_0}\xspace$ for 10, 30, and 50 atom hydrogen chains using open boundary conditions. For these systems $r=1.8$~\ensuremath{a_0}\xspace is close to the equilibrium bond distance.\cite{HachmannJChemPhys2006,MottaHChain1ArXiv2017} The PBC spectral functions for \ce{H_{50}} at two different geometries ($r=1.4, 3.6\, \ensuremath{a_0}\xspace$) are also shown. Additional OBC LDOS e.g. for intermediate bond distance can be found in the Supplementary Material. \begin{figure}[!ht] \includegraphics[width=9cm,trim={1.0cm 0.0cm 2.2cm 1.5cm},clip]{./hchains_diffdist.pdf} \caption{\label{fig:hchains_diffdist} LDOS for three equally spaced hydrogen chains (\ce{H_{10}} - red, \ce{H_{30}} - green, \ce{H_{50}} - blue) at three different bond distances ($r = 1.4, 1.8$ and $3.6$~\ensuremath{a_0}\xspace). LDOS of \ce{H_{50}} calculated at bond distances $r = 1.4$ and $3.6$~\ensuremath{a_0}\xspace with PBC (blue dashed lines) have been also included. All the LDOSs have been calculated on the central site of the chain. A broadening ($\eta$) of 0.05 a.u. has been used. Vertical lines are used to indicate the position of the ionization potential (IP) and electron affinity (EA) of the systems.} \end{figure} As the chain-length is increased, the gap is reduced but does not yet close. The finite size effects for \ce{H_{50}} at $r=1.8\, \ensuremath{a_0}\xspace$ and $r=3.6\, \ensuremath{a_0}\xspace$ are well converged as one can observe by comparing the \ce{H_{30}} and \ce{H_{50}} LDOS. However, significant finite size effects start appearing for more compressed chains, as can be seen for the $r=1.4\, \ensuremath{a_0}\xspace$ chain. We note that for compressed chains, the finite size error is mainly a single-particle effect rather than a result of Coulomb interactions. This is because the kinetic energy scales as $1/r^2$ at small $r$ while the Coulomb energy scales as $1/r$. The DDMRG$^{++}$ bandgap decreases significantly as the bondlength is decreased from 3.6 to 1.4~\ensuremath{a_0}\xspace. As the broadening in the LDOS blurs the gap, it is difficult to determine the gap with high precision purely from the LDOS. For this reason we also show positions of the ionization potential (IP) and electron affinity (EA) (vertical lines) computed from ground-state DMRG calculations at the same geometries. Note that (up to finite bond dimension errors) these will occur at precisely the same position as the rightmost and leftmost energy poles of the IP and EA Green's function computed from DDMRG$^{++}$. Determining the gap from IP-EA for the \ce{H_{50}} chain, for instance, gives 202, 209, and 530~\ensuremath{mE_h}\xspace gaps for $r=1.4, 1.8, 3.6$~\ensuremath{a_0}\xspace respectively. The finite chain gaps with OBC and PBC are not entirely consistent, and unfortunately it is difficult to estimate the band gaps in the thermodynamic limit. With PBC in particular, there are spurious interactions between charges and the periodic images of their exchange-correlation holes, and this produces larger finite size effects in the PBC calculations than in the OBC calculations, leading to a very poor thermodynamic limit extrapolation with PBC. Note that both the finite chain OBC and PBC gaps start to {\it increase} at very compressed distances due to the large single-particle finite size effects discussed above. \begin{figure}[!ht] \includegraphics[width=9cm,trim={1.0cm 0.0cm 2.2cm 1.5cm},clip]{./gap_diff.pdf} \caption{\label{fig:GAP_vs_R} Band gaps calculated for the \ce{H_{50}} chain. } \end{figure} To understand the effect of correlation on the metallicity, we show for comparison the RHF and UHF results. Both the RHF and UHF solutions display gaps, and at short distances, the RHF gap agrees well with the DMRG gap; the RHF gap at $r=1.4$~\ensuremath{a_0}\xspace for \ce{H_{50}}, for instance, is very similar to the DMRG reference (RHF = 234~\ensuremath{mE_h}\xspace, DMRG = 202~\ensuremath{mE_h}\xspace). At longer distances, the RHF gap is too small and is only 175~\ensuremath{mE_h}\xspace at $r=3.6$~\ensuremath{a_0}\xspace while the DMRG gap is 530~\ensuremath{mE_h}\xspace. The behaviour of the UHF gap with bond distance is qualitatively correct, but UHF overestimates the gap at all distances (e.g. for \ce{H_{50}} at $r=1.4$~\ensuremath{a_0}\xspace it is 312~\ensuremath{mE_h}\xspace while at $r=3.6$~\ensuremath{a_0}\xspace it is 734~\ensuremath{mE_h}\xspace). Note that at longer distances, the RHF gap is not a simple finite size effect but arises from the dimerization of the RHF solution through a bond-order wave, as can be clearly seen from the off-diagonal bond-order matrix elements of the 1-particle density matrix (i.e. $\rho_{i,i+1}$, $\rho_{i+1,i+2}$) see Fig.~\ref{fig:h50_density_trends}. The DMRG gaps are bounded by the RHF and UHF gaps for $r> 1.8$~\ensuremath{a_0}\xspace. \begin{figure}[!ht] \includegraphics[width=9cm,trim={1.0cm 0.0cm 2.2cm 1.5cm},clip]{./h50_rho_density_full.pdf} \caption{\label{fig:h50_density_trends} Comparison of DDMRG$^{++}$ (dots), RHF (solid line) and UHF (dashed line) density matrix off-diagonal elements $\rho_{ij}$ for the equally spaced \ce{H_{50}} chain as a function of the bond distance.} \end{figure} Another way to characterize the metallicity of the ground-state is from the complex polarization function. This quantity, denoted $\tilde{z}$,\cite{RestaPhysRevLett1998,StellaPhysRevB2011} is defined as: \begin{equation}\label{eq:comppol} \tilde{z}=\langle\Psi_0|e^{i(2\pi/N)\sum_ir_{in}}|\Psi_0\rangle \end{equation} where $r_{in}$ is the component of the $i^{th}$ electron position vector along the chain axis ($z$ in this case) and $N$ is the longitudinal dimension of the supercell. $\tilde{z}$ measures electron delocalization in the ground-state and its modulus $|\tilde{z}|\rightarrow 0$ for metallic behaviour, while $|\tilde{z}|\rightarrow 1$ in an insulator. Although $\tilde{z}$ is a complicated many-body observable, it can be conveniently computed by carrying out a time evolution for unit time using the fictitious Hamiltonian $\hat{H} = 2\pi/N\sum_ir_{in}$, followed by evaluating the overlap with the ground-state. Here we compute $\tilde{z}$ using the td-DMRG$^{++}$ algorithm. Note that when PBC are imposed the direct calculation of dipole integrals is not possible.\cite{RestaPhysRevLett1998} Given the local character of the Gaussian basis used, we define the dipole integrals as a multiplicative operator over the basis functions of the reference cell, such that: $\langle k |r|l\rangle \approx i\delta_{kl}$ where $i$ is the dimensionless number that indexes the position of the site $i$ on the chain. In the metallic limit, where the wavefunction is a product state of Bloch functions built from a single atom unit cell, this approximation yields $\tilde{z}=0$ as an exact evaluation would, and further the approximation becomes exact in the limit of long bond distances. \begin{figure*}[!ht] \includegraphics[width=16cm,trim={0.0cm 5.0cm 0.0cm 5.0cm},clip]{./Comp_pol.pdf} \caption{\label{fig:comppol} DMRG and HF complex polarization functions. In panel a) complex polarization functions for \ce{H_{10}}, \ce{H_{30}} and \ce{H_{50}} using DMRG are presented. In panel b) complex polarization functions for \ce{H_{50}} at the DMRG, RHF and UHF level of theory are presented. Periodic Boundary Conditions (PBC) have been used each case. } \end{figure*} In Fig.~\ref{fig:comppol} we plot the DMRG complex polarization function for \ce{H_{10}}, \ce{H_{30}}, and \ce{H_{50}} with PBC; for the \ce{H_{50}} chain we compare with the RHF and UHF values. The absolute value of the complex polarization function is exponentially sensitive to localization length and decreases very rapidly, for \ce{H_{50}} for instance, near $r=2.0$~\ensuremath{a_0}\xspace, and becomes close to zero for $r< 1.0$~\ensuremath{a_0}\xspace. A similar picture is presented by the RHF and UHF complex polarization functions. Unlike the single-particle gap, the complex polarization function can vanish in a system even when single-particle finite size effects are large so long as the electrons are completely delocalized. The vanishing of the DMRG complex polarization function in this system at short distances, as also reflected by the similarity in the size of the gaps, thus reflects the fact that the DMRG wavefunction begins to resemble the RHF wavefunction which is a Slater determinant of plane-wave like orbitals. However, the scaling of the complex polarization function with system size, much like the gap, converges only slowly with system size. Thus, to definitively establish a metal insulator transition will require studies of larger systems. These studies will be discussed in a future publication. \section{Conclusions} \label{sec:conclusions} In this work we studied two algorithms to obtain dynamical quantities from density matrix renormalization group wavefunctions in the ab initio context: the dynamical DMRG (DDMRG) algorithm, and the time-step targeting time-dependent DMRG (td-DMRG) algorithm. In particular, we proposed and implemented two improved variants of these algorithms, DDMRG$^{++}$ and td-DMRG$^{++}$, in the context of computing Green's functions and the density of states. DDMRG$^{++}$ and td-DMRG$^{++}$ yield improved dynamical quantities with respect to their parent DDMRG and td-DMRG algorithms, at a nominal increase in cost, and they are both simple to implement within existing ab initio DMRG codes. Our analysis suggests that DDMRG$^{++}$ and td-DMRG$^{++}$ require a comparable amount of computation time if we desire the density of states at a similar resolution over a large energy window. However, if one is interested only in the density of states in a small energy window (e.g. when computing the principal core ionization peak) then DDMRG$^{++}$ is advantageous. In our applications, we showed that in the water molecule, we could use DDMRG$^{++}$ to compute a core excitation energy in a quadruple zeta basis at a benchmark level of quality beyond that of existing correlation treatments. This suggests that DDMRG$^{++}$ and td-DMRG$^{++}$ will provide benchmarking capabilities for ab initio dynamical quantities similar to that provided by ground-state DMRG for ground-state properties. We also showed in larger hydrogen chains that we could use DDMRG$^{++}$ to compute the ab initio density of states in a system large enough to consider the thermodynamic limit of the spectrum, and used td-DMRG$^{++}$ to compute a complicated measure of delocalization, the complex polarization function. Both these capabilities will be useful in establishing the physics of the correlated metal-insulator transition in hydrogen chains, and more broadly to approach the spectral functions of other complex condensed phase problems in the future. Finally, the feasibility of these calculations suggests that DDMRG$^{++}$ and td-DMRG$^{++}$ may be fruitfully used to study the correlated density of states of more complex chemical systems, such as the multi-centre transition metal complexes that have previously been studied with DMRG. These are directions we will pursue in the future. \begin{acknowledgement} This work was supported by the US National Science Foundation via NSF:CHE-1657286 and NSF:CHE-1650436. E.R. would like to thank Dr. Alexander Yu. Sokolov for insightful discussions and Dr. Weifeng Hu for his help with the \textsc{Block} DMRG code. \end{acknowledgement}
{ "redpajama_set_name": "RedPajamaArXiv" }
4,884
At Dumpster Index, we strive to bring you the best service at the best price available. We have a wide selection of dumpster sizes in stock in Coden, AL, with flexible & timley pickup and delivery. Give us a call today for all your dumpster rental and roll off needs. Ensure that to know about the unaccepted junk and the tonnage control to avoid virtually any penalties through the landfill specialists and make your current trash package rental affordable. Every single dumpster will have specifications regarding the tonnage limit. Getting rid of the garbage devoid of crossing the specified limits minimizes any miscarriage from occurring. People who want to dispose of strong waste utilize dumpsters. It is not Okay to dump essential fluids or risky waste in to dumpsters. It is specifically not Okay to do that with rented dumpsters. This can not be perfect for the condition of the actual dumpster and furthermore, the health of the environment. Fresh paint and other this kind of liquid supplies that dry up can destroy the container because it can certainly make it weightier permanently and also cause some other debris to find dried in it. Hazardous throw away will destroy the environment. That particular is pretty do it yourself explanatory. Unsafe waste, such as chemical throw away, needs to always be disposed of effectively to not additional pollute our planet. If you are striving to dispose of lots of it then you shouldn't be using a dumpster. Untidy spots surrounding your current hotel will give a negative impact to visitors. You are unable to even have the trash cans for your gate anticipating the pickup truck from municipal authorities of the state. Counting on them intended for disposing your current trash would delay the duty for sure since they come with respect to their own agendas and also have boundaries on the tonnage of the trash got rid of at each interval. When you consider renting dumpsters you may even need to get one of those portable sanitation products for the team. Also, let's say your bathroom or perhaps bathrooms are increasingly being renovated? These kind of units tend to be used for special events where a locale or home-owner needs a more substantial capacity connected with restrooms for a short moment. These are not your current average campsite type of portable restroom. Superstars and company at special events use these sorts of restrooms at all times. Getting a dumpster program to help you to eliminate that huge, old garage packed with who-knows-what is a great idea. Though some people do not realize the item, you should not use a traditional garage pickup as a technique to get rid of the debris and aged items you've stored in this space. You may face penalties or limits depending on whatever you have incorporated into it. Rather, it is a good idea to hire a company to leave dumpsters at the property so that you can work through the wreck as you need to and also toss apart what you need to along the way. There are a number of benefits to doing this. When your condo with Maryland, Va or Washington DC is completed, the actual contractor can move the actual dumpster out of your yard and your condo building is gorgeous and thoroughly clean. Your new renter's or past renters will happily delight in their brand-new surroundings. Those are the most convenient way to get rid of human waste items. Thanks to these kinds of waste administration companies intended for offering you dumpsters on rent wherein you can dumps different kinds of human throw away produced for the construction site such as disposal food offers baskets crafted from paper etc. Fourth, when you are your dumpster, be certain that the materials you happen to be throwing away usually are approved by the municipality you live with. You can't dispose of flammable or even hazardous materials or car tires and devices in your dumpster. You can find hit which has a fine in case you put against the law materials inside your dumpster. So, learn what the rules usually are about what you may and cannot throw away before starting assembling your shed. In addition to trying to gauge the company's level of services, another good signal is what kind of experience the firm has. You'll end up purchasing the free area if you employ a roll off dumpster when your trash disposal is very less. Consult with the 5 Yard Dumpster Rental in Coden corporations if they rent trash dumpster that are little in size when put next to roll off dumpsters. These trash dumpsters usually range from 2 yard to 8 backyard. A company having fantastic support services will help you to decide what size dumpster you may need to rent. You should have the range of small, channel or big. The small dumpster is perfect for small property remodeling projects such as your lavatory. The channel dumpster is good for one layer of replacing roofing or home remodeling. The big dumpster is for very big home redesigning projects and will fit right up to ten pick up truck loads or even four numerous debris. You can certainly rent a overnight dumpster in Maryland. It should be so simple as making a swift phone call to timetable your rental. As long as you're reducing, recall to reuse and recycle. Precious metals like water piping can be sold at salvage shops if you've got scrap already there. Old vacant cans can be employed to store claws or anchoring screws. You could possibly try marketing old exercise equipment you no longer experience the internet (or even give it to a friend). Or, if you've got way more as opposed to occasional piece that you no more want or even need, make use of the newfound area to have a yard sale. If you're in a hurry to get rid of every thing, though, be happy to put it inside your rented dumpster. Many 5 Yard Dumpster Rental in Coden companies should go the extra mile to lessen their the environmental impact by going through the dumpster's contents to find recyclable and recyclable materials they can either recycling or contribute to charity. Getting a 5 Yard Dumpster Rental in Coden does not require virtually any big strategic plans just as case of one's big enterprise issues. You just need to book the dumpster specifying the time period of 5 Yard Dumpster Rental in Coden. To e-book a dumpster, you may need to place an order having 5 Yard Dumpster Rental in Coden service provider. A prior intimation of 24 hours will help the actual 5 Yard Dumpster Rental in Coden service provider to place a right dimensions dumpster at your entrance step. In business that is dependent so to a great extent on do it again customers and overall standing, you want a 5 Yard Dumpster Rental in Coden firm that has weathered the long haul and survived: in a nutshell, an established and experienced firm. Many of the 5 Yard Dumpster Rental in Coden corporations you may find could end up becoming untrustworthy pop up rental firms that exist for a few years, rip apart under a very poor reputation, and pop up someplace else under a various name, trying to pull the same tricks. Any well-established company should have none of such issues and are able to prove worthy of their particular reputation. Being an added safety measure, feel free to check out reviews for each and every company you take into account and ask for references if you like. Great reviews and good references will be a straightforward determiner of a actually excellent firm. An answer taken should go in spend unless it really is supported by necessary action. So just getting a resolution to guard the environment will never add almost any benefit to environmental surroundings if it is not backed up by tasks these kinds of hiring dumpster to be able to mitigate your pollution. They then take the information you've provided them, simply by entering it over a simple sort, and find the best selection and location of any perfect dumpster for your requirements. The company you choose will disappear the dumpster, next pick it up once more once it's full. The corporation will usually certainly be a local 1 so it's more cost-effective and faster than acquiring a roll off 5 Yard Dumpster Rental in Coden, AL from several remote place hundreds of a long way away, or even out of state. As you become your offer they will no doubt want to know should you have all garbage, some recyclables, precisely what types have got the latter. It's always safer to recycle materials when you can. Anytime spring arrives, we always want to do several renovation. I guess it's within tune for the saying "spring cleaning". It likely is in the air flow, the way the flower blooms plus the plants are additionally happy. A little bit of renovation furthermore brings exactly the same good sensation. It's including there is something new to look forward to. However renovating your home may require the help of the most experienced 5 Yard Dumpster Rental in Coden, AL company. Never procrastinate getting a local dumpster program if your house in a crucial state. An excessive amount garbage, garbage, and litter only leads to more debris and an detrimental situation. Nobody actually wishes to live that way, especially if you will find children as well as pets included. Waste is amongst the major contributors of the polluting the environment in the world. Different commercial and residential initiatives do play a role in the source of environmental pollution. Few of them consist of construction initiatives, business cleaning, business remodeling, house remodelling, house clean-up, yard clean-up. Leaving an existing house may make movers know just how much rubbish they have they want to get rid of. They will be thinking about how they accrued so much products. When moving services get to the completely new place they frequently have cardboard boxes and other points to throw away. This really is another reason to have a dumpster. Are you currently thinking about doing away with one-off items like home equipment or large pieces of furniture? These items can be extremely challenging to move around, and they're not things that your regular garbage service will certainly pick up. Rather than lugging these phones the get rid of yourself, you will want to let a dumpster company support the ? When you are aware you'll be doing away with items like household furniture or home equipment, rent a dumpster. Next, all you have to bother about is getting your offending articles into the pot. No matter what project you have in your house to complete, it is best to rent a dumpster for the task in an structured and quick way. You may not do any remodeling at all but still need to rent a dumpster. You could be cleaning up your attic. Perhaps the basement had flooding troubles. A lot of the pieces of your attic may have been ruined and are now starting to shape. You need to get eliminate the items quickly. Thankfully you will find next day dumpster companies to call when getting to work and have the moldy things out of your home immediately.
{ "redpajama_set_name": "RedPajamaC4" }
9,677
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sqisland.espresso.idling_resource.elapsed_time"> <application android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:theme="@style/AppTheme" android:allowBackup="true"> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest>
{ "redpajama_set_name": "RedPajamaGithub" }
1,084
\section{Introduction} Brain-computer interfaces (BCIs) can use brain signals such as the scalp electroencephalogram (EEG) to enable people to communicate or control external devices \cite{McFarland2010,He2015}. Thus, they can help people with devastating neuromuscular disorders such as amyotrophic lateral sclerosis, brainstem stroke, cerebral palsy, and spinal cord injury \cite{Wolpaw2006}. However, there are still many challenges in their transition from laboratory settings to real-life applications, including the reliability and convenience of the sensing hardware \cite{Liao2012}, and the availability of high-performance and robust algorithms for signal analysis and interpretation \cite{Lotte2015,Makeig2012,Wang2015,Jayaram2016}. This paper focuses on the latter, particularly, feature extraction for EEG-based BCIs. Riemannian geometry (RG) \cite{Lee2002,Berger2007,Pennec2006,Amari2000,Tuzel2008} is a very useful mathematical tool in machine learning and signal/image processing, due to its utility in generating smooth manifolds from intrinsically nonlinear data spaces. Recently it has also been introduced into the BCI community and demonstrated superior performance in a number of applications \cite{Barachant2014,Lotte2015,Barachant2014b,Congedo2013,Barachant2012,Li2012a,Barachant2013,Kalunga2016,Navarro-Sune2016,Yger2015,Waytowich2016}. For example, Li, Wong, and de Bruin \cite{Li2012a} used RG of the EEG power spectral density matrices for sleep pattern classification. They also proposed a closed-form weighting matrix for the power spectral density matrices to minimize the distance between similar features and to maximize the distance between dissimilar features, and demonstrated better performance than the Euclidian distance and the Kullback-Leibler distance. Barachant et al. \cite{Barachant2012} proposed two RG approaches for motor imagery classification. The first uses the spatial covariance matrices of the EEG signal as features and RG to directly classify them in the manifold of symmetric and positive definite (SPD) matrices. The second maps the covariance matrices onto the Riemannian tangent space, which is a Euclidean space, and then performs variable selection and classification. They achieved comparable or better performance than a multiclass Common Spatial Pattern (CSP) plus Linear Discriminant Analysis (LDA) approach. In \cite{Congedo2013}, Congedo, Barachant, and Andreev further used RG to build calibrationless BCI systems for applications based on event-related potentials, sensorimotor (mu) rhythms, and steady-state evoked potential. It outperformed several state-of-the-art approaches, including xDAWN, stepwise LDA, CSP+LDA, and blind source separation plus logistic regression. Barachant \cite{Barachant2014b} also proposed a spatial filter to increase the signal to signal-plus-noise ratio of magnetoencephalography (MEG) signals before constructing a special form of a covariance matrix for RG feature extraction, and a $k$-means clustering like unsupervised learning algorithm in the Riemannian manifold to improve the offline classification performance. This approach outperformed 266 other approaches and won the Kaggle ``DecMeg2014 -- Decoding the Human Brain" competition\footnote{https://www.kaggle.com/c/decoding-the-human-brain.}, which aimed to predict visual stimuli from MEG recordings of human brain activity. Kalunga et al. \cite{Kalunga2016} proposed an online classification approach in the Riemannian space and showed that it outperformed Canonical Correlation Analysis in Steady-State Visually Evoked Potential classification. Yger, Lotte, and Sugiyama \cite{Yger2015} empirically compared several covariance matrix averaging methods for EEG signal classification. They showed that RG for averaging covariance matrices improved performances for small dimensional problems, but as the dimensionality of the covariance matrix increased, RG became less efficient. Lotte \cite{Lotte2015} also proposed a framework to combine transfer learning, ensemble learning, and RG for calibration time reduction, which outperformed CSP+LDA. The Riemannian distance was used in regularization to emphasize auxiliary users whose covariance matrices are close to the target user. Navarro-Sune et al. \cite{Navarro-Sune2016} proposed a BCI to automatically detect patient-ventilator disharmony from EEG signals. RG of EEG covariance matrices was used in semi-supervised learning for effective classification of respiratory state, and it outperformed the Euclidean distance. Waytowich et al. \cite{Waytowich2016} proposed an approach to integrate RG with transfer learning and spectral meta-learner \cite{Parisi2014}, an offline ensemble fusion approach, for user-independent BCI, and demonstrated in single-trial event-related potential classification that it can significantly outperform existing calibration-free techniques and traditional within-subject calibration techniques when limited data is available. All above approaches focused on EEG classification problems in BCI, whereas BCI regression problems have been largely overlooked. In theory a regression problem is equivalent to a classification problem with infinitely many classes, and hence the output has much finer granularity than a traditional two-class or multi-class classification problem, which provides richer information in decision making. There are at least two types of BCI regression problems in the literature and practice. The first type is behavioral or cognitive status prediction, e.g., estimating the continuous value of a driver's drowsiness from the EEG \cite{drwuaBCI2015,Lin2008,Lin2005d,drwuTFS2016,drwuEBMAL2016,Lin2006,Wei2015,drwuSMLR2016}, and estimating a subject's response speed in a psychomotor vigilance task (PVT) from the EEG \cite{drwuSF2017}. The second type is direct control applications, e.g., controlling the movement of a mouse cursor using BCI \cite{Wolpaw1991,Wolpaw2000,McFarland1997a,Fruitet2010,Bradberry2011}, and controlling the continuous movement of a hand in the 3D space using EEG \cite{Bradberry2010}. Once the EEG signal is acquired, the regression problem involves three steps: 1) signal processing to increase the signal-to-noise ratio. Frequency domain filters, such as band pass filters and notch filters \cite{Bradberry2010,Bradberry2011}, and spatial filters, such as independent component analysis \cite{Lin2005d} and CSP \cite{drwuSF2017}, are frequently used here. 2) feature extraction to construct meaningful predictors, e.g., standardized difference of the EEG voltage \cite{Bradberry2010,Bradberry2011}, and EEG power band features \cite{drwuEBMAL2016,drwuaBCI2015,drwuSF2017,drwuSMLR2016}. 3) regression algorithms to estimate the continuous output, e.g., ordinary linear regression \cite{Bradberry2010,Bradberry2011}, ridge regression \cite{drwuaBCI2015}, LASSO \cite{drwuSF2017}, $k$-nearest neighbors (kNN) \cite{drwuSF2017}, fuzzy neural networks \cite{Lin2006}, transfer learning \cite{drwuTFS2016,Wei2015}, active learning \cite{drwuEBMAL2016}, etc. In this paper, we apply RG and tangent space features to supervised BCI regression problems. To overcome the limitation pointed out by Yger, Lotte, and Sugiyama \cite{Yger2015}, i.e., RG is less efficient when the dimensionality of the covariance matrix is large, we adopt an approach similar to what Barachant used in \cite{Barachant2014b}: we first use a spatial filter proposed in \cite{drwuSF2017} to reduce the dimensionality of the covariance matrices and also to increase the EEG signal quality, and then extract the RG features in the Riemannian tangent space. We validate the performance of the proposed approach in reaction time (RT) estimation from EEG signals measured in a large-scale sustained-attention PVT \cite{Drummond2005}, which collected 143 sessions of data from 17 subjects in a 5-month period. To our knowledge, this is the first time that RG has been used in BCI regression problems. The remainder of this paper is organized as follows: Section~\ref{sect:Filter} describes the spatial filter we proposed earlier for supervised BCI regression problems. Section~\ref{sect:RG} introduces RG and the tangent space features for BCI regression problems. Section~\ref{sect:exp} describes the experimental setup, RT and EEG data preprocessing techniques, and the procedure to evaluate the performances of different feature extraction methods. Section~\ref{sect:results} presents the results of the comparative studies. Section~\ref{sect:discussions} provides parameter sensitivity analysis and additional discussions. Finally, Section~\ref{sect:conclusions} draws conclusions and outlines a future research direction. \section{Spatial Filtering for Supervised BCI Regression Problems} \label{sect:Filter} Recently we \cite{drwuSF2017} proposed two spatial filters for supervised BCI regression problems, which were extended from the common spatial pattern (CSP) algorithm for supervised classification problems. They have similar performance and computational cost. One of them, CSP for regression - one versus the rest (CSPR-OVR), is briefly introduced in this section, as the RG features are better extracted from the spatially filtered EEG data than the raw EEG data. Let $\mathbf{X}_n\in \mathbb{R}^{C\times S}$ ($n=1,...,N$) denote the $n$th EEG trial in the training data, where $C$ is the number of channels and $S$ the number of time samples. We assume that the mean of each channel measurement has been removed, which is usually performed by band-pass filtering. Let $y_n\in\mathbb{R}$ be the corresponding RT of the $n$th trial. CSPR-OVR first constructs $K$ fuzzy sets \cite{Zadeh1965}, which partition the training samples into $K$ fuzzy classes. To do that, it partitions the interval $[0, 100]$ into $K+1$ equal intervals, and denotes the partition points as $\{p_k\}_{k=1,...,K}$. It is easy to obtain that \begin{align} p_k=\frac{100\cdot k}{K+1},\qquad k=1,...,K \label{eq:pk} \end{align} For each $p_k$, CSPR-OVR then finds the corresponding $p_k$ percentile value of all training $y_n$ and denotes it as $P_k$. Next we define $K$ fuzzy classes from them, as shown in Fig.~\ref{fig:FSs}. \begin{figure}[htpb] \centering \includegraphics[width=8cm,clip]{FSs} \caption{The $K$ fuzzy classes for $y_n$.} \label{fig:FSs} \end{figure} Then, for each fuzzy class, CSPR-OVR computes its mean spatial covariance matrix as: \begin{align} \bar{\mathbf{\Sigma}}_k=\frac{\sum_{n=1}^N \mu_k(y_n)\mathbf{X}_n\mathbf{X}_n^T}{\sum_{n=1}^N \mu_k(y_n)}, \qquad k=1,...,K\label{eq:fP0} \end{align} where $\mu_k(y_n)$ is the membership degree of $y_n$ in Fuzzy Class $k$. Next CSPR-OVR designs a spatial filtering matrix $\mathbf{W}_k^*\in \mathbb{R}^{C\times F}$, where $F$ is the number of individual vector filters, to maximize the variance difference between Fuzzy Class $k$ and the rest, i.e., \begin{align} \mathbf{W}_k^* =\arg\max\limits_{\mathbf{W}\in \mathbb{R}^{C\times F}}\frac{\mathrm{Tr}(\mathbf{W}^T\bar{\mathbf{\Sigma}}_k\mathbf{W})} {\mathrm{Tr}[\mathbf{W}^T(\sum_{i\neq k}\bar{\mathbf{\Sigma}}_i)\mathbf{W}]} \label{eq:W1} \end{align} where $\mathrm{Tr}(\cdot)$ is the trace of a matrix. (\ref{eq:W1}) is a generalized Rayleigh quotient \cite{Golub1996}, and the solution $\mathbf{W}_k^*$ is the concatenation of the $F$ eigenvectors associated with the $F$ largest eigenvalues of the matrix $(\sum_{i\neq k}\bar{\mathbf{\Sigma}}_i)^{-1}\bar{\mathbf{\Sigma}}_k$. The final spatial filtering matrix $\mathbf{W}^*\in \mathbb{R}^{C\times KF}$ is the concatenation of all $\mathbf{W}_k^*$, i.e., \begin{align} \mathbf{W}^*=[\mathbf{W}_1^*, \quad \ldots, \quad\mathbf{W}_K^*] \label{eq:W} \end{align} and the spatially filtered trial for $\mathbf{X}_n$ is: \begin{align} \mathbf{X}_n'={\mathbf{W}^*}^T\mathbf{X}_n,\quad n=1,...,N. \label{eq:Xi} \end{align} In summary, the complete CSPR-OVR algorithm for supervised BCI regression problems is shown in Algorithm~\ref{alg:SF3}. \begin{algorithm}[h] \KwIn{EEG training examples $(\mathbf{X}_n,y_n)$, where $\mathbf{X}_n\in \mathbb{R}^{C\times S}$, $n=1,...,N$\; \\ \hspace*{10mm} $K$, the number of fuzzy classes for $y_n$\; \\ \hspace*{10mm} $F$, the number of spatial filters for each \\ \hspace*{12mm} fuzzy class.} \KwOut{Spatially filtered EEG trials $\mathbf{X}_n'\in \mathbb{R}^{KF\times S}$.} Band-pass filter each $\mathbf{X}_n$ to remove the mean of each channel\; Compute $\{p_k\}_{k=1,...,K}$ in (\ref{eq:pk})\; Compute the corresponding percentile values $\{P_k\}_{k=1,...,K}$ for $y_n$\; Construct the $K$ fuzzy classes as shown in Fig.~\ref{fig:FSs}\; Compute $\bar{\mathbf{\Sigma}}_k$ by (\ref{eq:fP0})\; Compute $\mathbf{W}_k^*$ by (\ref{eq:W1})\; Construct $\mathbf{W}^*$ by (\ref{eq:W})\; \textbf{Return} $\mathbf{X}_n'$ by (\ref{eq:Xi}) \caption{The CSPR-OVR spatial filter for supervised BCI regression problems \cite{drwuSF2017}.} \label{alg:SF3} \end{algorithm} \section{RG and the Tangent Space Features} \label{sect:RG} This section introduces the basics of RG, and an approach to extract the Riemannian tangent space features. \subsection{Riemannian Geometry} The RG approach for BCI works on the covariance matrices of EEG trials, which are symmetric positive-definite and form a differentiable Riemannian manifold $\mathcal{M}$ \cite{Forstner1999} with dimensionality $R(R+1)/2$, where $R$ is the number of rows (columns) of the covariance matrices. As a result, we need to use Riemannian metrics, instead of the traditional Euclidean metrics, which are more appropriate for flat spaces of vectors. Particularly, we are interested in the distance measure between two covariance matrices, as many machine learning methods rely on such distances. The \emph{Riemannian distance} $\delta(\bar{\mathbf{\Sigma}},\mathbf{\Sigma}_n)$ between two covariance matrices $\bar{\mathbf{\Sigma}}\in\mathbb{R}^{R\times R}$ and $\mathbf{\Sigma}_n\in\mathbb{R}^{R\times R}$, called the \emph{geodesic}, is the minimum length of a curve connecting them on the manifold $\mathcal{M}$. It can be computed as \cite{Moakher2005,Arsigny2007}: \begin{align} \delta(\bar{\mathbf{\Sigma}},\mathbf{\Sigma}_n)=\left\|\log \left(\bar{\mathbf{\Sigma}}^{-1}\mathbf{\Sigma}_n\right)\right\|_F =\left[\sum_{r=1}^R\log^2\lambda_r\right]^{\frac{1}{2}} \end{align} where the subscript $_F$ denotes the Frobenius norm, and $\lambda_r$, $r=1,...,R$, are the real eigenvalues of $\bar{\mathbf{\Sigma}}^{-1}\mathbf{\Sigma}_n$. At $\bar{\mathbf{\Sigma}}\in \mathcal{M}$, a scalar product can be defined in the associated \emph{tangent space} $\mathcal{T}_{\bar{\mathbf{\Sigma}}}\mathcal{M}$. This tangent space is Euclidean and locally homomorphic to the manifold. So, Riemannian distance computations in the manifold can be approximated by Euclidean distance computations in the tangent space \cite{Barachant2013}. The \emph{logarithmic map} projects locally a $\mathbf{\Sigma}_n\in \mathcal{M}$ onto the tangent space $\mathcal{T}_{\bar{\mathbf{\Sigma}}}\mathcal{M}$ of $\bar{\mathbf{\Sigma}}$ by: \begin{align} \hat{\mathbf{\Sigma}}_n=\mathrm{Log}_{\bar{\mathbf{\Sigma}}}(\mathbf{\Sigma}_n)= \bar{\mathbf{\Sigma}}^{\frac{1}{2}}\mathrm{logm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)\bar{\mathbf{\Sigma}}^{\frac{1}{2}} \label{eq:TS} \end{align} where $\mathrm{logm}(\cdot)$ denotes the logarithm of a matrix \cite{Berger2007}. The logarithm of a diagonalizable matrix $\mathbf{A=VDV}^{-1}$ is defined as $\mathrm{logm}(\mathbf{A})=\mathbf{VD}'\mathbf{V}^{-1}$, where $\mathbf{D}'$ is a diagonal matrix with elements $\mathbf{D}'_{i,i}=\log(\mathbf{D}_{i,i})$. The \emph{exponential map} projects an element $\hat{\mathbf{\Sigma}}_n$ on the tangent space $\mathcal{T}_{\bar{\mathbf{\Sigma}}}\mathcal{M}$ back to the manifold $\mathcal{M}$ by: \begin{align} \mathbf{\Sigma}_n=\mathrm{Exp}_{\bar{\mathbf{\Sigma}}}(\hat{\mathbf{\Sigma}}_n)= \bar{\mathbf{\Sigma}}^{\frac{1}{2}}\mathrm{expm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right) \bar{\mathbf{\Sigma}}^{\frac{1}{2}} \end{align} where $\mathrm{expm}(\cdot)$ denotes the exponential of a matrix \cite{Berger2007}. The exponential of a diagonalizable matrix $\mathbf{A=VDV}^{-1}$ is defined as $\mathrm{expm}(\mathbf{A})=\mathbf{VD}'\mathbf{V}^{-1}$, where $\mathbf{D}'$ is a diagonal matrix with elements $\mathbf{D}'_{i,i}=\exp(\mathbf{D}_{i,i})$. Fig.~\ref{fig:RG} illustrates a Riemannian manifold $\mathcal{M}$, the tangent space $\mathcal{T}_{\bar{\mathbf{\Sigma}}}\mathcal{M}$ at $\bar{\mathbf{\Sigma}}$, the geodesic between $\bar{\mathbf{\Sigma}}$ and $\mathbf{\Sigma}_n$, and the corresponding logarithmic and exponential maps. \begin{figure}[htpb]\centering \includegraphics[width=.9\linewidth,clip]{RG.eps} \caption{Illustration of a manifold $\mathcal{M}$ and the corresponding local tangent space $\mathcal{T}_{\bar{\mathbf{\Sigma}}}\mathcal{M}$ at $\bar{\mathbf{\Sigma}}$. $\mathrm{Log}_{\bar{\mathbf{\Sigma}}}(\mathbf{\Sigma}_n)$ projects the matrix $\mathbf{\Sigma}_n$ on the manifold into the matrix $\hat{\mathbf{\Sigma}}_n$ in the tangent space of $\bar{\mathbf{\Sigma}}$. $\mathrm{Exp}_{\bar{\mathbf{\Sigma}}}(\hat{\mathbf{\Sigma}}_n)$ projects $\hat{\mathbf{\Sigma}}_n$ in the tangent space of $\bar{\mathbf{\Sigma}}$ into $\mathbf{\Sigma}_n$ on the manifold. The blue curve represents the geodesic between $\bar{\mathbf{\Sigma}}$ and $\mathbf{\Sigma}_n$ on the manifold.} \label{fig:RG} \end{figure} The Riemannian distance $\delta(\bar{\mathbf{\Sigma}},\mathbf{\Sigma}_n)$ between two covariance matrices $\bar{\mathbf{\Sigma}}$ and $\mathbf{\Sigma}_n$ on the manifold $\mathcal{M}$ can also be computed by a Euclidean distance in the tangent space around $\bar{\mathbf{\Sigma}}$, i.e. \cite{Barachant2012}, \begin{align} \delta(\bar{\mathbf{\Sigma}},\mathbf{\Sigma}_n)&=\left\|\mathrm{Log}_{\bar{\mathbf{\Sigma}}} (\mathbf{\Sigma}_n)\right\|_{\bar{\mathbf{\Sigma}}} =\left\|\mathrm{upper}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\hat{\mathbf{\Sigma}}_n \bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)\right\|_2\nonumber \\ &=\left\|\mathrm{upper}\left(\mathrm{logm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)\right)\right\|_2 \end{align} where the $\mathrm{upper}(\cdot)$ operator keeps the upper triangular part of a symmetric matrix and vectorizes it by applying weight 1 for the diagonal elements and weight $\sqrt{2}$ for the out-of-diagonal elements \cite{Tuzel2008}. The \emph{RG mean} \cite{Pennec2006a}, or the \emph{intrinsic mean} \cite{Fletcher2004}, of $N$ covariance matrices is defined as the matrix minimizing the sum of the squared Riemannian distances, i.e., \begin{align} \bar{\mathbf{\Sigma}}\equiv \mathfrak{G}(\mathbf{\Sigma}_1,...,\mathbf{\Sigma}_N) =\arg\min\limits_{\mathbf{\Sigma}}\sum_{n=1}^N\delta^2(\mathbf{\Sigma},\mathbf{\Sigma}_n) \end{align} There is no closed-form expression for the RG mean, but an iterative gradient descent algorithm (see Algorithm~\ref{alg:RGmean} \cite{Fletcher2004}) can be used to find the solution. Note that Algorithm~\ref{alg:RGmean} makes heavy use of the logarithmic and exponential maps. In this paper we used the implementation in the Matlab Covariance Toolbox\footnote{https://github.com/alexandrebarachant/covariancetoolbox.}. \begin{algorithm}[h] \KwIn{$\mathbf{\Sigma}_n\in\mathbb{R}^{R\times R}$, $n=1,...,N$\; \hspace*{10mm} $\epsilon >0$.} \KwOut{The RG (intrinsic) mean $\bar{\mathbf{\Sigma}}\in\mathbb{R}^{R\times R}$.} Initialize $\bar{\mathbf{\Sigma}}_0=\mathbf{0}\in\mathbb{R}^{R\times R}$, the zero matrix\; Initialize $\bar{\mathbf{\Sigma}}=I\in\mathbb{R}^{R\times R}$, the identify matrix\; \Repeat{$\left\|\bar{\mathbf{\Sigma}}-\bar{\mathbf{\Sigma}}_0\right\|<\epsilon$}{ $\bar{\mathbf{\Sigma}}_0=\bar{\mathbf{\Sigma}}$\; $\hat{\mathbf{\Sigma}}=\frac{1}{N}\sum_{n=1}^N\mathrm{Log}_{\bar{\mathbf{\Sigma}}_0}(\mathbf{\Sigma}_n)$\; $\bar{\mathbf{\Sigma}}=\mathrm{Exp}_{\bar{\mathbf{\Sigma}}_0}(\hat{\mathbf{\Sigma}})$.} \textbf{Return} $\bar{\mathbf{\Sigma}}$ \caption{The gradient descent algorithm for computing the RG (intrinsic) mean \cite{Fletcher2004}.} \label{alg:RGmean} \end{algorithm} \subsection{Tangent Space Features for BCI Regression Problems} To use the tangent space features for BCI regression problems, we first spatially filter each $\mathbf{X}_n$ to obtain $\mathbf{X}'_n$ in (\ref{eq:Xi}), and then estimate its spatial covariance matrix $\mathbf{\Sigma}_n\in\mathbb{R}^{KF\times KF}$ (note that each row of $\mathbf{X}'_n$ has zero mean): \begin{align} \mathbf{\Sigma}_n=\frac{1}{S}\mathbf{X}_n' \mathbf{X}_n'^T, \quad n=1,..., N \label{eq:Sigman} \end{align} Next, we compute the Riemannian mean $\bar{\mathbf{\Sigma}}$ of all $\mathbf{\Sigma}_n$ by Algorithm~\ref{alg:RGmean}, and take the $KF(KF+1)/2$ upper triangular part of $\mathrm{logm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)$ as our features. Note that we need to assign weight 1 to the diagonal elements of $\mathrm{logm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)$ and weight $\sqrt{2}$ to the out-of-diagonal elements so that their Euclidean norm is equal to the Riemannian distance between $\bar{\mathbf{\Sigma}}$ and $\mathbf{\Sigma}_k$. The weights do not have an effect when regression methods like LASSO are used, but are very important for distance based regression methods like kNN regression. The complete tangent space feature extraction procedure for BCI regression problems is summarized in Algorithm~\ref{alg:RG}. \begin{algorithm}[h] \KwIn{Spatially filtered EEG trial $\mathbf{X}_n'\in\mathbb{R}^{KF\times S}$, $n=1,...,N$.} \KwOut{$KF(KF+1)/2$ tangent space features for each trial.} Compute $\mathbf{\Sigma}_n$ by (\ref{eq:Sigman})\; Compute $\bar{\mathbf{\Sigma}}$ by Algorithm~\ref{alg:RGmean}\; Construct the $KF(KF+1)/2$ tangent space features for $\mathbf{X}_n'$ from $\mathrm{logm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)$. \caption{The Riemannian tangent space feature extraction procedure for BCI regression problems.} \label{alg:RG} \end{algorithm} \section{Experiments and the Performance Evaluation Process} \label{sect:exp} This section introduces a PVT experiment that was used to evaluate the performances of the proposed tangent space feature extraction method, and the corresponding RT and EEG data preprocessing procedures. \subsection{Experiment Setup} \label{sect:PVT} Seventeen university students (13 males; average age 22.4, standard deviation 1.6) from National Chiao Tung University (NCTU) in Taiwan volunteered to support the data-collection efforts over a 5-month period to study EEG correlates of attention and performance changes under specific conditions of real-world fatigue \cite{Kerick2016}, as determined by the percent effectiveness score of Readiband \cite{Russell2015}. The Institutional Review Board of NCTU approved the experimental protocol. The customer-designed daily sampling system consists of a smartphone, actigraph, sleep diary, subjective scales of fatigue and stress, and software for recording, storing, transmitting, and analyzing data acquired from individuals in their natural environments on a daily basis. Each participant was provided a wrist-worn actigraph (Fatigue Science Readiband, Vancouver, BC), and was instructed to complete several subjective report scales and enter the percent effectiveness score from the actigraph approximately 30-60 minutes upon awakening each morning and to be available for experiment testing approximately once every 1-3 weeks over a 5-month period for a total of nine repeated sessions. Data recorded by the daily sampling system included electronically-adapted visual analog scales of fatigue and stress, the Karolinska Sleepiness Scale \cite{Akerstedt1990}, and the Pittsburgh Sleep Diary \cite{Monk1994}. The daily sampling data were automatically uploaded from the smartphone to a designated secure server at NCTU on a daily basis. In this way we could track and identify periods when the participants were currently exhibiting low, normal, or high levels of fatigue based on the percent effectiveness score values ($>$90\%, $70-90\%$, $<$70\%, respectively). The goal was to examine the participants during experiment sessions three times within each of the three fatigue levels. Most participants finished all nine sessions. When the participants reported to the laboratory, we measured their fatigue level on site again right before the experiment to make sure it was close to the fatigue state reported via the smartphone. Upon completion of the related questionnaires and the informed consent form, subjects performed a PVT, a dynamic attention-shifting task, a lane-keeping task, and selected surveys preceding each condition. EEG data were recorded at 1000 Hz using a 64-channel NeuroScan Quik-Cap system (62 EEG channels and 1 electrocardiogram channel). The ground was between FPZ and FZ, and the reference channels were A1 and A2 at the mastoids. In this paper we focus on the PVT \cite{Dinges1985}, which is a sustained-attention task that uses RT to measure the speed with which a subject responds to a visual stimulus. It is widely used, particularly by NASA, for its ease of scoring, simple metrics, convergent validity, and free of learning effects. In our experiment, the PVT was presented on a smartphone with each trial initiated as an empty solid white circle centered on the touchscreen that began to fill in red displayed as a clockwise sweeping motion like the hand of a clock. The sweeping motion was programmed to turn solid red in one second or terminate upon a response by the participants, which required them to tap the touchscreen with the thumb of their dominant hand. The RT was computed as the elapsed time between the appearance of the empty solid white circle and the participant's response. Following completion of each trial, the circle went back to solid white until the next trial. Inter-trial intervals consisted of random intervals between 2-10 seconds. 143 sessions of PVT data were collected from the 17 subjects, and each session lasted 10 minutes. Our goal is to predict the RT using a short EEG trial immediately before it. \subsection{Performance Evaluation Process} \label{sect:process} The following procedure was used to evaluate the performances of different feature extraction methods: \begin{enumerate} \item \emph{RT data preprocessing to remove outliers.} The number of trials and the mean RTs for the 17 subjects are shown in Table~\ref{tab:RTs}. Subject 17 may have data recording issues, because many of his RTs were longer than 5 seconds, which are highly unlikely in practice, and his mean RT was more than two times larger than the largest mean RT from other subjects. So we excluded him from consideration in this paper, and only used Subjects 1-16. \begin{table*}[ht] \centering \setlength{\tabcolsep}{1.6mm} \caption{Number of trials and mean RTs for the 17 subjects.} \label{tab:RTs} \begin{tabular}{c|ccccccccccccccccc} \hline Subject & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17\\ \hline Number of trials & 809 & 813 & 839 & 685 & 843 & 465 & 833 & 610 & 769 & 813 & 743 & 828 & 803 &794 & 528 & 823 & 553 \\ Mean RT (s) & 0.47 & 0.51 & 0.47 & 0.98 & 0.49 & 0.42 & 0.61 & 0.44 & 0.81 & 0.46 & 1.03 & 0.45 & 0.57 & 0.59 & 0.67 & 0.49 & 2.14 \\ \hline \end{tabular} \end{table*} The RTs were very noisy, and there were obvious outliers. It is very important to suppress the outliers and noise so that the performances of different algorithms can be more accurately compared. We employed the following 2-step procedure for RT data preprocessing: \begin{enumerate} \item \emph{Outlier removal}, which aimed to remove abnormally large RTs. First, a threshold $\theta=m_y+3\sigma_y$ was computed for each subject, where $m_y$ is the mean RT from all sessions of that subject, and $\sigma_y$ is the corresponding standard deviation. Then, all RTs larger than $\theta$ were removed. Note that the threshold was different for different subjects. \item \emph{Moving average smoothing}, which replaced each RT by the average RT during a 60 seconds moving window centered at the onset of the corresponding PVT to suppress the noise. \end{enumerate} \item \emph{EEG data preprocessing to remove or suppress artifacts and noise.} Generally raw EEG data recorded from the scalp contain many artifacts (e.g., head motion, blinks, eye movements, etc.) and noise (e.g., power-line noise, noise caused by changes in electrode impedances, etc.) \cite{Uriguen2015,Bigdely-Shamlo2015}, so it is very important to remove or suppress them to increase the signal-to-noise ratio before a machine learning algorithm is applied. This paper used the standardized early-stage EEG processing pipeline (PREP) \cite{Bigdely-Shamlo2015}, which consists of three steps: a) remove line-noise, b) determine and remove a robust reference signal, and, c) interpolate the bad channels (channels with a low recording signal-to-noise ratio). The preprocessed EEG signals coming out of PREP were downsampled to 250 Hz. They were then epoched to 5-second trials according to the onset of the PVTs: if a PVT started at $t$, then the 62-channel EEG trial in $[t-5, t]$ seconds was used to predict the RT, i.e., $\mathbf{X}_n\in\mathbb{R}^{62\times 1250}$. Each trial was then individually filtered by a $[1, 20]$ Hz finite impulse response band-pass filter to make each channel zero-mean and to remove non-relevant high frequency components. \item \emph{5-fold cross-validation to compute the regression performance for each combination of feature set and regression method.} We first randomly partitioned the trials into five folds; then, used four folds for supervised spatial filtering and regression model training, and the remaining fold for testing. We repeated this five times so that every fold was used in testing. Finally we computed the regression performances in terms of root mean square error (RMSE) and correlation coefficient (CC). We extracted the following three different feature sets for each preprocessed EEG trial: \begin{itemize} \item \emph{Feature Set 1 (\texttt{FS1}): Theta and Alpha powerband features from the band-pass filtered EEG trials.} We computed the average power spectral density in the Theta band (4-8 Hz) and Alpha band (8-13 Hz) for each channel using Welch's method \cite{Welch1967}, and converted these $62\times 2=124$ band powers to dBs as our features. \item \emph{Feature Set 2 (\texttt{FS2}): Theta and Alpha powerband features from EEG trials filtered by Algorithm~\ref{alg:SF3}.} This procedure was almost identical to the above one, except that the band-pass filtered EEG trials were also spatially filtered by Algorithm~\ref{alg:SF3} before the powerband features were computed. We used 3 fuzzy sets for the RTs, and 10 spatial filters for each fuzzy class, so that the spatially filtered EEG trials had dimensionality $30\times 1250$, and \texttt{FS2} had 60 dimensions. \item \emph{Feature Set 3 (\texttt{FS3}): Riemannian tangent space features from EEG trials filtered by Algorithm~\ref{alg:SF3}.} That is, we first band-pass filtered the raw EEG signals, then spatially filtered them by Algorithm~1 ($K=10$ and $F=3$), and further applied Algorithm~\ref{alg:RG} to extract the tangent space features, which had $30\times 31/2=465$ dimensions. \end{itemize} Two regression methods were used on each feature set: LASSO \cite{Tibshirani1996}, and kNN regression \cite{Altman1992}. For labeled training data $\{\mathbf{x}_n, y_n\}_{n=1,...,N}$, LASSO solves the following minimization problem to find a sparse linear regression model: \begin{align} \min_{\beta_0,\boldsymbol{\beta}}\left[\frac{1}{2N}\sum_{n=1}^N \left(y_n-\beta_0-\boldsymbol{\beta}^T\mathbf{x}_n\right)^2+\lambda\left\|\boldsymbol{\beta}\right\|_1\right] \end{align} where $\lambda> 0$ is an adjustable parameter, which was optimized by an inner 5-fold cross-validation on the training dataset in this paper. Once $\beta_0$ and $\boldsymbol{\beta}$ are identified, the final LASSO regression model is: \begin{align} \hat{y}_n=\beta_0+\boldsymbol{\beta}^T\mathbf{x}_n \end{align} We used $k=5$ in kNN. Once the five nearest neighbors $\{\mathbf{x}_i, y_i\}_{i=1,...,5}$ to the new trial $\mathbf{x}_n$ are identified, the regression output is computed as a weighted average: \begin{align} \hat{y}_n=\frac{\sum_{i=1}^5 w_iy_i}{\sum_{i=1}^5 w_i} \end{align} where the weights are the inverses of the feature distances: \begin{align} w_i=\frac{1}{\|\mathbf{x}_n-\mathbf{x}_i\|_2} \end{align} \item \emph{Repeat Step~3 10 times and compute the average regression performance.} \end{enumerate} \section{Experimental Results} \label{sect:results} This section compares the informativeness of the features in \texttt{FS1}, \texttt{FS2} and \texttt{FS3}, and presents the regression performances. \subsection{Informativeness of the Features} Before studying the regression performance, it is important to check if the extracted features in \texttt{FS1}, \texttt{FS2} and \texttt{FS3} are indeed meaningful. In this first study, we computed the CC between the RT and powerband features in \texttt{FS1} at different channel locations for each of the 16 subjects, and then averaged them. The corresponding topoplot is shown in Fig.~\ref{fig:topo}. Both theta and alpha band powers show higher correlation at the central and central-frontal regions of the brain; however, generally the CC is small. This indicates that \texttt{FS1} features are not very informative. \begin{figure}[htpb]\centering \subfigure[]{\includegraphics[width=.49\linewidth,clip]{theta.eps}} \subfigure[]{\includegraphics[width=.49\linewidth,clip]{alpha.eps}} \caption{Topoplot of the average CC between the RT and the powerband features from \texttt{FS1} at different channel locations. (a) theta; (b) alpha.} \label{fig:topo} \end{figure} In the second study, we picked a typical subject, partitioned his data randomly into 50\% training and 50\% testing, and extracted the powerband features \texttt{FS1}. We then designed the spatial filters using Algorithm~1 on the training data, and extracted the corresponding powerband features \texttt{FS2}, and the Riemannian tangent space features \texttt{FS3} using Algorithm~3. For each feature set, we identified the top three features that had the maximum CCs with the RT using the training data, and also computed the corresponding CCs for the testing data. The results are shown in Fig.~\ref{fig:corr}, where in each panel the data on the left of the black dotted line were used for training, and the right for testing. The top thick curve is the RT, and the bottom three curves are the maximally correlated features identified from the training data. The training and testing CCs are shown on the left and right of the corresponding feature, respectively. For \texttt{FS1}, we also show the corresponding channel labels and powerband names. For \texttt{FS2}, we only show the powerband names of the top three features, as a channel here does not have a specific label (each channel in \texttt{FS2} is a weighted combination of all 62 physical electrodes). Fig.~\ref{fig:corr} shows that \texttt{FS2} gave much smoother features than \texttt{FS1}, and also achieved much larger CCs to the RT, both in training and testing, suggesting that spatial filtering by Algorithm~1 can indeed increase the signal quality. \texttt{FS3} further achieved larger training and testing CCs to the RT than \texttt{FS2}, suggesting that the tangent space features are more informative than the powerband features. \begin{figure}[htpb]\centering \includegraphics[width=\linewidth,clip]{corr.eps} \caption{Features from different feature extraction methods, and the corresponding training and testing CCs with the RT.} \label{fig:corr} \end{figure} \subsection{Estimation Performance Comparison} The RMSEs and CCs of LASSO and kNN using three different feature sets are shown in Fig.~\ref{fig:perf} for the 16 subjects. Recall that for each subject the feature extraction methods were run 10 times, each with randomly partitioned training and testing data, and the average regression performances are shown here. The average RMSEs and CCs across all subjects are also shown in the last group of each panel. \begin{figure}[htpb]\centering \includegraphics[width=\linewidth,clip]{RMSECC.eps} \caption{RMSEs and CCs of the six approaches on the 16 subjects. } \label{fig:perf} \end{figure} Fig.~\ref{fig:perf} shows that regardless of which regression method was used, generally \texttt{FS2} resulted in smaller RMSEs and larger CCs than \texttt{FS1}, suggesting that the spatial filtering approach can indeed improve the regression performance. Fig.~\ref{fig:perf} also shows that \texttt{FS3} further achieved better RMSEs and CCs than \texttt{FS2}, suggesting that the tangent space features were more effective than the powerband features. Finally, LASSO had better performance than kNN on \texttt{FS1}, but kNN became better on \texttt{FS2} and \texttt{FS3}. The RMSEs for Subjects~4, 9 and 11 in Fig.~\ref{fig:perf} are much larger than others, because, as shown in Table~\ref{tab:RTs}, these three subjects have much larger RTs than others. To illustrate the performance differences among the three feature extraction methods from another viewpoint, Fig.~\ref{fig:prc} shows the corresponding percentage performance improvements of LASSO and kNN using the three feature sets, where the legend ``\texttt{LASSO,FS2}/\texttt{FS1}" means the percentage performance improvement of LASSO on \texttt{FS2} over LASSO on \texttt{FS1}, and other legends should be understood in a similar manner. For LASSO, on average \texttt{FS3} had $4.30\%$ smaller RMSE than \texttt{FS2}, and $6.59\%$ larger CC. For kNN, on average \texttt{FS3} had $8.30\%$ smaller RMSE than \texttt{FS2}, and $11.13\%$ larger CC. These results again demonstrated that the tangent space features are more effective than the traditional powerband features. \begin{figure}[htpb]\centering \includegraphics[width=\linewidth,clip]{RMSECCPrc.eps} \caption{Pairwise percentage performance improvement of the algorithms on the 16 subjects. } \label{fig:prc} \end{figure} We also performed a two-way Analysis of Variance (ANOVA) for different regression algorithms to check if the raw RMSE and CC differences among the three feature sets (\texttt{FS1}, \texttt{FS2}, and \texttt{FS3}) were statistically significant, by setting the subjects as a random effect. The results are shown in Table~\ref{tab:ANOVA} as ``$p$ for raw values." Study results showed that there were statistically significant differences (at 5\% level) in raw CCs among different feature sets for both LASSO and kNN, but not for raw RMSEs. However, because the RTs from different subjects had significantly different magnitudes, an ANOVA on the raw RMSEs and CCs may be unfair for those subjects with small RTs. So, we also performed a two-way ANOVA for different algorithms and feature sets on the ratios. For example, to compute the RMSE ratios for LASSO, we replaced all RMSEs for \texttt{FS1} by 1, the RMSEs for \texttt{FS2} by the ratios of the corresponding RMSEs from \texttt{FS2} over those from \texttt{FS1}, and the RMSEs for \texttt{FS3} by the ratios of the corresponding RMSEs from \texttt{FS3} over those from \texttt{FS1}. In this way the RMSEs were normalized, and hence different subjects were treated equally. The corresponding ANOVA test results are shown in Table~\ref{tab:ANOVA} as ``$p$ for ratios." Observe that there were statistically significant differences (at 5\% level) in both RMSE ratios and CC ratios among different feature sets for both LASSO and kNN. \begin{table}[!ht] \centering \setlength{\tabcolsep}{2mm} \caption{$p$-values of two-way ANOVA tests for $\{\texttt{FS1},\ \texttt{FS2}, \ \texttt{FS3}\}$.} \label{tab:ANOVA} \begin{tabular}{l|cc||cc} \hline &\multicolumn{2}{c||}{LASSO} & \multicolumn{2}{c}{kNN} \\ \hline &RMSE & CC & RMSE & CC \\ \hline $p$ for raw values & .8183 & $\mathbf{.0000}$ &.2742& $\mathbf{.0000}$\\ $p$ for ratios & $\mathbf{.0000}$ & $\mathbf{.0000}$ &$\mathbf{.0000}$& $\mathbf{.0000}$\\ \hline \end{tabular} \end{table} Then, non-parametric multiple comparison tests based on Dunn's procedure \cite{Dunn1961,Dunn1964} were used to determine if the difference between any pair of algorithms was statistically significant, with a $p$-value correction using the False Discovery Rate method \cite{Benjamini1995}. The $p$-values for the raw values are shown in Table~\ref{tab:Dunn1}, and the $p$-values for the ratios are shown in Table~\ref{tab:Dunn2}, where the statistically significant ones are marked in bold. Table~\ref{tab:Dunn1} shows that the raw RMSE difference between \texttt{FS3} and \texttt{FS1} was statistically significant when kNN was used. Furthermore, the raw CC differences between all pairs of feature sets were statistically significant. Table~\ref{tab:Dunn2} shows that the ratio differences between all pairs of feature sets were statistically significant, for both LASSO and kNN. \begin{table}[!ht] \centering \setlength{\tabcolsep}{1mm} \caption{$p$-values of non-parametric multiple comparison on the raw values for $\{\texttt{FS1},\ \texttt{FS2}, \ \texttt{FS3}\}$.} \label{tab:Dunn1} \begin{tabular}{l|cc|cc|cc|cc} \hline &\multicolumn{4}{c|}{LASSO} & \multicolumn{4}{c}{kNN} \\ \hline &\multicolumn{2}{c|}{RMSE} &\multicolumn{2}{c|}{CC} & \multicolumn{2}{c|}{RMSE} & \multicolumn{2}{c}{CC} \\ \hline & \texttt{FS1} & \texttt{FS2} & \texttt{FS1} & \texttt{FS2} & \texttt{FS1} & \texttt{FS2} & \texttt{FS1} & \texttt{FS2} \\ \hline \texttt{FS2} & .2143 & & \textbf{.0001} & &.0852 & & \textbf{.0000} &\\ \texttt{FS3} &.1319&.2702 &\textbf{.0000}& \textbf{.0001}&\textbf{.0034}&.0711 &\textbf{.0000}&\textbf{.0000}\\ \hline \end{tabular} \end{table} \begin{table}[!ht] \centering \setlength{\tabcolsep}{1mm} \caption{$p$-values of non-parametric multiple comparison on the ratios for $\{\texttt{FS1},\ \texttt{FS2}, \ \texttt{FS3}\}$.} \label{tab:Dunn2} \begin{tabular}{l|cc|cc|cc|cc} \hline &\multicolumn{4}{c|}{LASSO} & \multicolumn{4}{c}{kNN} \\ \hline &\multicolumn{2}{c|}{RMSE} &\multicolumn{2}{c|}{CC} & \multicolumn{2}{c|}{RMSE} & \multicolumn{2}{c}{CC} \\ \hline & \texttt{FS1} & \texttt{FS2} & \texttt{FS1} & \texttt{FS2} & \texttt{FS1} & \texttt{FS2} & \texttt{FS1} & \texttt{FS2} \\ \hline \texttt{FS2} & \textbf{.0000} & & \textbf{.0000} & &\textbf{.0000} & & \textbf{.0000} &\\ \texttt{FS3} &\textbf{.0000}&\textbf{.0000} &\textbf{.0000}& \textbf{.0000}&\textbf{.0000}&\textbf{.0000} &\textbf{.0000}&\textbf{.0000}\\ \hline \end{tabular} \end{table} \section{Discussions} \label{sect:discussions} This section provides parameter sensitivity analysis and additional discussions. \subsection{Parameter Sensitivity Analysis} Tangent space feature extraction relies on the spatial filter in Algorithm~1, which has two adjustable parameters: $K$, the number of fuzzy classes for the RTs, and $F$, the number of spatial filters for each fuzzy class. The filtering performance is robust to $K$ but changes noticeably when $F$ changes \cite{drwuSF2017}. As a result, the performance of the tangent space features also varies as $F$ changes. In this subsection we study the sensitivity of the regression performance to $F$. The regression performances for $F=\{5, 10, 15, 20\}$ ($K$ was fixed to be 3) are shown in Fig.~\ref{fig:nFilters}. Algorithms~1 and 3 were repeated five times, each time with a random partition of training and testing data, and the average regression results are shown. Note that $F$ cannot be too large because of three constraints: 1) $F$ cannot exceed the number of channels ($C$) in the original EEG data, because $\bar{\mathbf{\Sigma}}_k\bar{\mathbf{\Sigma}}^{-1}\in \mathbb{R}^{C\times C}$ in (\ref{eq:W1}) has at most $C$ eigenvectors; 2) the tangent space features have dimensionality $KF(KF+1)/2$, which increases rapidly with $F$; so, a large $F$ can easily result in over-fitting; and, 3) there may be numerical difficulties in computing the RG mean when $F$ is large, e.g., for Subjects~5, 8 and 15 in Fig.~\ref{fig:nFilters} when $F=20$. \begin{figure}[tb]\centering \subfigure[]{\includegraphics[width=\linewidth,clip]{RMSECCnFiltersLASSO.eps}} \subfigure[]{\includegraphics[width=\linewidth,clip]{RMSECCnFilterskNN.eps}} \caption{RMSEs and CCs of (a) LASSO and (b) kNN with respect to $F$, the number of spatial filters for each fuzzy class in Algorithm~1.} \label{fig:nFilters} \end{figure} Fig.~\ref{fig:nFilters} shows that the regression performance increased when $F$ increased from 5 to 15, but decreased when $F$ further increased to 20. For the PVT experiment, $F\in[10,15]$ seemed to achieve a good compromise between performance and computational cost. Additionally, in the previous subsection we used 5-second EEG trials to estimate the corresponding RT, and it is also interesting to study how the estimation performance changes with different trial lengths. The results are shown in Fig.~\ref{fig:trialLength} for trial lengths of $\{1, 3, 5, 7, 9\}$ seconds. In general, as trial length increased, the estimation performance improved. However, a longer trial means heavier computational cost and larger delay in estimation. Furthermore, a trial cannot be arbitrary long, as then it cannot capture the up-to-date RT. These effects should be taken into consideration when choosing the right trial length. \begin{figure}[htpb]\centering \subfigure[]{\includegraphics[width=\linewidth,clip]{RMSECCtrialLengthLASSO.eps}} \subfigure[]{\includegraphics[width=\linewidth,clip]{RMSECCtrialLengthkNN.eps}} \caption{RMSEs and CCs of (a) LASSO and (b) kNN with respect to the trial length.} \label{fig:trialLength} \end{figure} \subsection{Regression Performance versus the Number of Features} Recall from Section~\ref{sect:process} that \texttt{FS1} has 124 features, \texttt{FS2} has 60 features, and \texttt{FS3} has 465 features, i.e., \texttt{FS3} has much more features than \texttt{FS1} and \texttt{FS2}. So, \texttt{FS3}'s superior performance may be due to its increased number of features. In this subsection we investigate the relationship between the regression performance and the number of useful features. Because LASSO automatically selects the most useful features, whereas kNN always uses all the features, in this study we focus only on LASSO. For each subject and each feature set, we used all data in LASSO training, and recorded the number of selected features, as well as the corresponding training RMSEs and CCs. The results are shown in Fig.~\ref{fig:numFeatures}. On average LASSO selected 58.6 features from \texttt{FS1}, 30.6 features from \texttt{FS2}, and 69.1 features from \texttt{FS3}. Although the selected \texttt{FS2} subset was only about half the size of the selected \texttt{FS1} subset, they resulted in similar overall training RMSEs and CCs. Connecting this observation with that in the previous subsection, i.e., \texttt{FS2} had much better testing RMSEs and CCs than \texttt{FS1}, we can conclude that the CSPR-OVR spatial filter can aggregate the most useful information into just a small number of features, which reduces overfitting and improves the generalization performance. Fig.~\ref{fig:numFeatures} also shows that the selected \texttt{FS3} subset was slightly larger than the selected \texttt{FS1} subset, but the \texttt{FS3} subset resulted in much better training performance, and also much better testing performance, as presented in the previous subsection. These observations together suggest that the Riemannian geometry approach can indeed extract some novel informative features, which improve both the training and the testing performances. \begin{figure}[htpb]\centering \includegraphics[clip,width=\linewidth]{numFeatures.eps} \caption{The nubmer of features selected by LASSO, and the corresponding training RMSEs and CCs.} \label{fig:numFeatures} \end{figure} \subsection{Computational cost} The training of our feature extraction method (\texttt{FS3}) consists of three steps: 1) design the CSPR-OVR filter by Algorithm~1; 2) compute the RG mean $\bar{\mathbf{\Sigma}}$ by Algorithm~2; and, 3) map the spatially filtered EEG trials to the Riemannian tangent space by Algorithm~3. Once the training is done, feature extraction for a testing trial can be performed very efficiently: a matrix multiplication (\ref{eq:Xi}) is first used to spatially filter it, and then another matrix multiplication (\ref{eq:Sigman}) is used to compute its spatial covariance matrix $\mathbf{\Sigma}_n$; finally, compute $\mathrm{logm}\left(\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}\right)$ and take its upper triangular part as the features. Note that $\bar{\mathbf{\Sigma}}$ has been obtained in training, so $\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}$ can be pre-computed, and hence $\bar{\mathbf{\Sigma}}^{-\frac{1}{2}} \mathbf{\Sigma}_n\bar{\mathbf{\Sigma}}^{-\frac{1}{2}}$ is also a simple matrix multiplication. So, in this subsection we focus on the training computational cost only. Let $N$ be the number of training samples. Then, the actual training time increased linearly with $N$, as shown in Fig.~\ref{fig:compCost}. The platform was a Dell XPS15 laptop (Intel i7-6700HQ CPU @2.60GHz, 16 GB memory) running Windows 10 Pro 64-bit and Matlab 2016b. A least squares curve fit shows that the training time is $0.0261+0.0030N$ seconds, which should not be a problem for a practical $N$. \begin{figure}[htpb]\centering \includegraphics[clip,width=.8\linewidth]{compCost.eps} \caption{The training time of our feature extraction method w.r.t. $N$.} \label{fig:compCost} \end{figure} \subsection{RT versus Fatigue State} We also studied the relationship between the RT and the fatigue state. Our conjecture is that as the fatigue level goes up, the RT should be larger. Boxplots of the RT in different sessions for two typical subjects are shown in Fig.~\ref{fig:RTstate}, where ``L", ``N" and ``H" mean low, normal, and high fatigue, respectively. Fig.~\ref{fig:RTstate} shows that the mean RT of a high fatigue sessions is generally larger than that of a low or normal fatigue session, and the former also has more extreme values and a larger variance. The difference between a low fatigue session and a normal fatigue session is not obvious. These observations suggest that although the fatigue state contains some useful information, it may be too coarse for accurate RT prediction. That's why it was not used in this paper. \begin{figure}[htpb]\centering \includegraphics[clip,width=\linewidth]{RTstate.eps} \caption{Boxplots of the RT in different fatigue states for two typical subjects.} \label{fig:RTstate} \end{figure} \section{Conclusions and Future Research} \label{sect:conclusions} In this paper, we have proposed a new feature extraction approach for EEG-based BCI regression problems: a spatial filter is first used to increase the EEG trial signal quality and also to reduce the dimensionality of the covariance matrix, and then Riemannian tangent space features are extracted. We validated the performance of the proposed approach in RT estimation from EEG signals measured in a large-scale sustained-attention PVT experiment, and showed that compared with the traditional powerband features, the tangent space features can reduce the estimation RMSE by 4.30-8.30\%, and increase the estimation CC by 6.59-11.13\%. To our knowledge, this is the first time that RG has been used in BCI regression problems. Our future research will focus on reducing the dimensionality of the tangent space features. As shown in Algorithm~3, the tangent space features have dimensionality $KF(KF+1)/2$, where $K$ is the number of fuzzy classes for the RTs, and $F$ is the number of spatial filters for each fuzzy class. So, the feature dimensionality increases quadratically with respect to both $K$ and $F$, which quickly results in overwhelming computational cost, overfitting, and numerical problems. We will investigate effective dimensionality reduction approaches for the tangent space features to reduce the computational cost while maintaining or even improving the regression performance. \section*{Acknowledgement} Research was sponsored by the U.S. Army Research Laboratory and was accomplished under Cooperative Agreement Numbers W911NF-10-2-0022 and W911NF-10-D-0002/TO 0023. The views and the conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the U.S. Army Research Laboratory or the U.S Government. This work was also partially supported by the Australian Research Council (ARC) under discovery grant DP150101645.
{ "redpajama_set_name": "RedPajamaArXiv" }
6,111
module Bonlang.ErrorMessages where import Bonlang.Lang import Text.Parsec (SourcePos) noMainModule :: SourcePos -> BonlangError noMainModule at = DefaultError $ "No 'Main' module defined at: " ++ show at noMainFunction :: SourcePos -> BonlangError noMainFunction at = DefaultError $ "No 'main' function defined at: " ++ show at cantStartNonModule :: BonlangValue -> BonlangError cantStartNonModule x = DefaultError $ "Can't start eval on non module. Provided: " ++ show x
{ "redpajama_set_name": "RedPajamaGithub" }
5,357
package io.cloudracer.properties; import java.io.IOException; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; import org.junit.Test; import org.w3c.dom.Document; import org.xml.sax.SAXException; /** * Parse the XML configuration document, used for testing, to endure that it is properly formated. * * @author John McDonnell */ public class TestServerConfigurationParseXML { /** * Parse the XML configuration document that is used for testing. * * @throws Exception * */ @Test public void parseXML() throws Exception { // NOSONAR final String xml = "/mocktcpserver.xml"; final String schemaName = "/mocktcpserver.xsd"; DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setNamespaceAware(true); DocumentBuilder parser; try { parser = builderFactory.newDocumentBuilder(); Document document = parser.parse(ClassLoader.class.getResourceAsStream(xml)); SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); Source schemaFile = new StreamSource(ClassLoader.class.getResourceAsStream(schemaName)); Schema schema = factory.newSchema(schemaFile); Validator validator = schema.newValidator(); validator.validate(new DOMSource(document)); } catch (ParserConfigurationException | SAXException | IOException e) { throw e; // NOSONAR } } }
{ "redpajama_set_name": "RedPajamaGithub" }
5,332
Penang is a state in Malaysia. Penang may also refer to: Places Penang Island Penang International Airport Penang Bridge Others Penang FA, a football club based in George Town, Penang, Malaysia Penang (restaurant chain) Penang Hokkien, a dialect of Hokkien spoken in the district of Penang, Malaysia Phanaeng, a type of red Thai curry See also Penan, aboriginal people in Brunei
{ "redpajama_set_name": "RedPajamaWikipedia" }
6,811
\section{Introduction}\label{intro} Curves on surfaces, which are generic immersions into surfaces, are well studied as elements of the free $\mathbb{Z}$-module generated by the set $\hat{\pi}$ of homotopy classes of loops on a surface. They have two natural products; one of them is of Goldman \cite{Goldman1986} and the other is of Andersen-Mattes-Reshetikhin \cite{AndersenMattesReshetikhin1998, AndersenMattesReshetikhin1996}. For the former, Turaev cobracket \cite{Turaev1991} gives Lie bialgebra; for the latter, Cahn operation induces co-Jacobi and coskew symmetry identities \cite{Cahn2013}. For knots, Kauffman \cite{Kauffman2013}, Folwaczny-Kauffman\cite{FolwacznyKauffman2013}, Cheng-Gao \cite{ChengGao2013}, and Satoh-Taniguchi \cite{SatohTaniguchi2014} independently introduce the affine index polynomial of virtual knots; virtual knots are identified with stable equivalence classes of signed curves on surfaces as in the word theory of Turaev \cite{Turaev2006}. Interestingly, the affine index polynomial is recovered by Turaev-type cobracket with the two-dimensional intersection form as is explained in this section. In this paper, we revisit coproducts where two theories meets and we proceed to seek a triple coproduct. Although this paper describes stable equivalence classes of curves, the corresponding homotopy argument on a Lie bialgebra will be given elsewhere. Either $C$ or $C^{(i)}$ ($i=1, 2$) denotes a stable equivalence class of single- or multi-component oriented curves on oriented surfaces. A curve with the base point is called \emph{pointed}. If there is no confusion, we do not mention the number of components and the base point. Link diagrams are regarded as curves with over/under information such that each crossing has two kinds of signs: the local orientation and the writhe. Let the $\operatorname{sgn}$ ($\epsilon$,~resp.) be the sign given by the local orientation of tangent vectors (the local writhe,~resp.) for each crossing of a curve (link diagram,~resp.) on surfaces. In particular, the sign ``$\operatorname{sgn}$" is positive if the local orientation coincides with that of a surface and is negative otherwise. For a given $C$ on a surface, if we smoothen a crossing $c_i$ along the orientation (Fig.~\ref{Seifert}), then we have two components $C^{(k)}_i$ ($k=1, 2$). If $c_i$ is the positive crossing, let $C^{(1)}$ ($C^{(2)}$,~resp.) be local positively (negatively,~resp.) oriented (Fig.~\ref{PolyToTuraev}); the ordering is exchanged otherwise. \begin{figure}[b] \includegraphics[width=4cm]{Seifert.pdf} \caption{Smoothing (which is called a Seifert splice)}\label{Seifert} \end{figure} \begin{figure}[b]\includegraphics[width=10cm]{p5figure.pdf} \caption{Local positively (negatively,~resp.) curve marked by 1 (2,~resp.). }\label{PolyToTuraev} \end{figure} Then for a diagram $C$ of a virtual knot $K$, \[ \sum_i \epsilon(c_i) (t^{C^{(2)}_i \cdot C^{(1)}_i} - 1) \] is known as the \emph{affine index polynomial}, where $C^{(1)}_i \cdot C^{(2)}_i$ ($=$ $-C^{(2)}_i \cdot C^{(1)}_i$) is the intersection number of ordered curves $C^{(1)}_i$ and $C^{(2)}_i$. It is highly suggestive. In fact, the affine index polynomial essentially obeys the Turaev coproduct $\Delta^{(2)} : \mathbb{Z} [\hat{\pi}] \to \mathbb{Z} [\hat{\pi}] \otimes_{\mathbb{Z}} \mathbb{Z} [\hat{\pi}]$; $C$ $\mapsto$ $ \sum_{i} \operatorname{sgn}(c_i)\, C^{(1)}_i \otimes C^{(2)}_i$. Therefore, if we replace ``$\epsilon$" with ``$\operatorname{sgn}$", we have: \begin{proposition}\label{prop:sign} Let $C$ be a representative of an element of stable equivalence classes of single-component curves on surfaces. Then \[ \sum_i \operatorname{sgn}(c_i) (t^{C^{(2)}_i \cdot C^{(1)}_i} - 1) \] is an invariant of stable equivalence classes of curves. \end{proposition} \noindent The above sign-replacement reminds us of Lemma~\ref{lem:curvelink}. \begin{lemma}[Turaev {\cite[Remark~7.2]{Turaev2006}}]\label{lem:curvelink} Let $C$ be a multi-component curve having a crossing $c_i$. The bijection \[ \operatorname{sgn}(c_i) \mapsto \epsilon(c_i) \] induces the map $\iota$ sending $C$ to an ordered pointed diagram $D=\iota(C)$ of a virtual link $L$ $=L(\iota(C))$. The map $\iota$ is well-defined, i.e. the induced map $\bar{\iota}$ sends a stable equivalence class of $C$ to the ordered pointed virtual link $L= \bar{\iota}(C)$. \end{lemma} \noindent Lemma~\ref{lem:curvelink} directly implies Lemma~\ref{linking} that is related to the linking number (Fact~\ref{factlk}). Here $\langle A, G \rangle$ denotes a bilinear form called a \emph{Gauss diagram formula} as in \cite{Ostlund2004, GoussarovPolyakViro2000}. \begin{lemma}\label{linking} Let $G_D$ be a Gauss diagram of a link diagram $D$. Then the intersection number $C^{(1)} \cdot C^{(2)}$ equals \[ \langle \LK, G_{D(C^{(1)} \cup C^{(2)})} \rangle \quad(= \langle \dLK, G_{D(C^{(1)} \cup C^{(2)})} \rangle).\] \end{lemma} \begin{fact}[{\cite[Theorem~5]{PolyakViro1994}}]\label{factlk} Let $G_D$ be a Gauss diagram of a link diagram $D$. The function $\langle \LK, G_D \rangle$ is the linking number of $D$. \end{fact} \noindent This encourages us to proceed on this line, e.g. $\Delta^{(3)} : \mathbb{Z} [\hat{\pi}] \to \mathbb{Z} [\hat{\pi}] \otimes_{\mathbb{Z}} \mathbb{Z} [\hat{\pi}] \otimes_{\mathbb{Z}} \mathbb{Z} [\hat{\pi}]$; \begin{equation} \label{formula:coproduct} C \mapsto \sum_{(c_i, c_j) : \text{parallel}} {\operatorname{sign}(c_i)\operatorname{sign}(c_j)}\, C^{(1)}_{ij} \otimes C^{(2)}_{ij} \otimes C^{(3)}_{ij}, \end{equation} where $C$ is a pointed curve, $c_i$ and $c_j$ are ordered crossings from the base point, and $C^{(k)}_{ij}$ ($i=1, 2, 3$) denotes a curve given and ordered by smoothing $c_i, c_j$ along the orientation, a \emph{parallel pair} is defined in Section~\ref{sec:preliminary}. Note that the sum runs over both $(c_i, c_j)$ and $(c_j, c_i)$ wheres by definition, $C^{(k)}_{ij}$ and $C^{(k)}_{ji}$ are stably equivalent. Applying the concept of (\ref{formula:coproduct}) to the argument of stable equivalence classes of link diagrams or curves, we have Theorem~\ref{main}. For a pointed link $L$, $\mu_{123}(L)$ $=$ $\left\langle \LLtfs + \LRfst + \RRstf, G_L \right\rangle$ is called the Milnor's triple linking number (Polyak, \cite{Polyak1997}). By this form, it is clear that $\mu_{123}(L)$ is also an invariant of pointed virtual links preserving the order of components and the base point of each component (in other words, $\mu_{123}(L)$ is an invariant of stable equivalence classes of pointed link diagrams $D$ ($=D(L)$) on surfaces) \footnote{Note also that $\mu_{123} (L)$ does not need to take modulo by linking numbers if we do not request the invariance under base point moves. }. \begin{theorem}\label{main} Let $D$ be a diagram for a long virtual knot $L$, $\{ c_1, c_2, \dots, c_n \}$ the set of ordered crossings of $D$ and each $C^{(k)}_{ij}$ $(k=1, 2, 3)$ the pointed curve given by smoothing $c_i, c_j$ along the orientation. The base point of $C^{(2)}_{ij}$ $($$C^{(3)}_{ij}$,~resp.$)$ is given by $c_i$ $($$c_j$,~resp.$)$. Then \[ \sum_{(c_i, c_j) : \operatorname{parallel}} \epsilon(c_i) \epsilon(c_j) (t^{\mu_{123}(C^{(1)}_{ij} \cup C^{(2)}_{ij} \cup C^{(3)}_{ij})} - 1) \] is an invariant of long virtual knots. \end{theorem} \begin{figure} \includegraphics[width=5cm]{Newfigure3.pdf} \caption{The transformation between chord diagrams indicates that smoothing parallel pair of a single-component curve gives the three-component curve with the three base points}\label{OneToThree} \end{figure} \begin{proposition}\label{prop:signTh} Let $C$ be a representative of an element of stable equivalence classes of single-component pointed curves on surfaces. Then \[ \sum_{(c_i, c_j) : \operatorname{parallel}} \operatorname{sgn}(c_i) \operatorname{sgn}(c_j) (t^{\mu_{123} (\iota (C^{(1)}_{ij} \cup C^{(2)}_{ij} \cup C^{(3)}_{ij} ))} - 1) \] is an invariant of stable equivalence classes of curves. \end{proposition} Proposition~\ref{variation} suggests alternative choices for $\mu_{123}(L)$. \begin{proposition}\label{variation} Let $\sigma$ be the permutation $\left(\begin{matrix} 1 & 2 & 3 \\ i & j & k \end{matrix}\right)$ and let \begin{align*} \lambda^{\sigma} = \LLkij~ + \LR~ + \RRjki \quad, \\ \nu^{\sigma} = \LLjki~ + \RL~ + \RRkij \quad. \end{align*} Then for a diagram $D$ of $3$-component link $L$ with the base points, $\langle \lambda^{\sigma}, G_D \rangle$ and $\langle \nu^{\sigma}, G_D \rangle$ are link homotopy invariants of $L$. \end{proposition} \begin{theorem}\label{mainVariation} Let $D$ be a diagram of a long virtual knot $L$, $\{ c_1, c_2, \dots, c_n \}$ the set of ordered crossings of $D$ and each $C^{(k)}_{ij}$ $(k=1, 2, 3)$ the pointed curve given by smoothing $c_i, c_j$ along the orientation. The base point of $C^{(2)}_{ij}$ $($$C^{(3)}_{ij}$,~resp.$)$ is given by $c_i$ $($$c_j$,~resp.$)$. Then \[ \sum_{(c_i, c_j) : \operatorname{parallel}} \epsilon(c_i) \epsilon(c_j) (t^{\lambda^{\sigma}(C^{(1)}_{ij} \cup C^{(2)}_{ij} \cup C^{(3)}_{ij})} - 1), \] \[ \sum_{(c_i, c_j) : \operatorname{parallel}} \epsilon(c_i) \epsilon(c_j) (t^{\nu^{\sigma} (C^{(1)}_{ij} \cup C^{(2)}_{ij} \cup C^{(3)}_{ij})} - 1) \] are invariants of long virtual knots. \end{theorem} \begin{proposition}\label{prop:signTh} Let $C$ be a representative of an element of stable equivalence classes of single-component pointed curves on surfaces. Then \[ \sum_{(c_i, c_j) : \operatorname{parallel}} \operatorname{sgn}(c_i) \operatorname{sgn}(c_j) (t^{\lambda^{\sigma} (\iota (C^{(1)}_{ij} \cup C^{(2)}_{ij} \cup C^{(3)}_{ij} ))} - 1) \] \[ \sum_{(c_i, c_j) : \operatorname{parallel}} \operatorname{sgn}(c_i) \operatorname{sgn}(c_j) (t^{\nu^{\sigma} (\iota (C^{(1)}_{ij} \cup C^{(2)}_{ij} \cup C^{(3)}_{ij} ))} - 1) \] are invariants of stable equivalence classes of curves. \end{proposition} \begin{remark} A generalization (e.g., $k$-parallel) will be written elsewhere. \end{remark} \section{Preliminary} \label{sec:preliminary} We list elementary facts and definitions which will be used. \begin{fact}[{\cite[Theorem~1]{Polyak2010}}] Let $D$ and $D'$ be two diagrams in $\mathbb{R}^2$ representing the same oriented link. Then one may pass from $D$ to $D'$ by isotopy and a finite sequence of four oriented Reidemeister moves $\Omega_{1a}$, $\Omega_{1b}$, $\Omega_{2a}$, and $\Omega_{3a}$. \end{fact} \begin{figure}[h] \includegraphics[width=12cm]{figure4R.pdf}\label{Reide} \caption{A generating set of Reidemeister moves} \end{figure} \begin{fact}[{\cite[Theorem~1]{ItoTakimura2017}}] Let $C$ and $C'$ be two generic immersions in $\mathbb{R}^2$. Then one may pass from $C$ to $C'$ by plane isotopy and a finite sequence of four oriented deformations $\widehat{\Omega_{1a}}$, $\widehat{\Omega_{1b}}$, $\widehat{\Omega_{2a}}$, and $\widehat{\Omega_{3a}}$. \end{fact} \begin{figure}[h] \includegraphics[width=12cm]{figure5hat.pdf} \caption{A generating set of plane curves} \label{Deformations} \end{figure} \begin{fact}[well-known fact]\label{fact:intersection} The intersection number $C^{(1)}_i$ and $C^{(2)}_i$ is a homotopy invariant; in particular, it is invariant under deformations $\widehat{\Omega_{1a}}$, $\widehat{\Omega_{1b}}$, $\widehat{\Omega_{2a}}$, and $\widehat{\Omega_{3a}}$. \end{fact} In this paper, the definitions with respect to \emph{Gauss diagrams} / \emph{arrow diagrams} and their dual notions, \emph{Gauss diagram formulas}, obey \cite{PolyakViro1994, GoussarovPolyakViro2000} \footnote{Though \cite{PolyakViro1994} treats classical links only, it is easy to see that the notation of Gauss diagram formula can apply to virtual links.}. Traditionally, when we forget an orientation, an arrow of an arrow diagram is often called a \emph{chord}. \begin{definition} Any pair of two chords, say, $c_i, c_j$ in $G_C$, should be of a type $\x$ or $\chordth$; the latter-type is called a \emph{parallel pair}. \end{definition} By definition, since two crossings $c_i, c_j$ one-to-one correspond to two chords, we use the same symbol to present two crossings. \section{Proof of Theorem~\ref{main}} \subsection{Invariance of $\Omega_{1a}$ and $\Omega_{1b}$ ($\widehat{\Omega_{1a}}$ and $\widehat{\Omega_{1b}}$)} For any case, each oriented Reidemeister move increases a single crossing $c_i$. Smoothing $c_i$ produces a circle $\widetilde{C}$ that has no crossings. Then, the intersection number between $\widetilde{C}$ and the other curve is $0$, which implies the invariance under $\Omega_{1a}$ and $\Omega_{1b}$ (or $\widehat{\Omega_{1a}}$ and $\widehat{\Omega_{1b}}$). \begin{figure} \includegraphics[width=5cm]{RIA.pdf} \caption{Oriented Reidemeister moves $\Omega_{1a}$, $\Omega_{1b}$} \label{RI} \end{figure} \subsection{Invariance of $\Omega_{2a}$ ($\widehat{\Omega_{2a}}$)} For any case, exactly two crossings, say $c, c'$, which are increased by $\Omega_{2a}$ (or $\widehat{\Omega_{2a}}$), the corresponding pair of the two chords is \emph{not} parallel (Fig.~\ref{GRII}). \begin{figure} \includegraphics[width=4cm]{figure7.pdf}\label{GRII} \caption{Gauss-diagram presentation $\Omega_{2+-}$ (\"{O}stlund notation) corresponding to the Reidemeister move $\Omega_{2a}$ (Polyak notation)}\label{GRII} \end{figure} Thus the proof returns to checking two cases: one of them smoothens $c$ and the other smoothens $c'$. The fact $\epsilon(c)$ $+$ $\epsilon(c')$ $=0$ (or $\operatorname{sgn}(c)$ $+$ $\operatorname{sgn}(c')$ $=0$) implies the invariance of $\Omega_{2a}$ (or $\widehat{\Omega_{2a}}$). \begin{figure} \includegraphics[width=5cm]{RIIA.pdf} \caption{Oriented Reidemeister move $\Omega_{2a}$} \label{RII} \end{figure} \subsection{Invariance of $\Omega_{3a}$ ($\widehat{\Omega_{3a}}$)} Suppose that exactly three crossings, say $c, c', c''$, are vertices of a triangle of $\Omega_{3a}$ (or $\widehat{\Omega_{3a}}$). \subsubsection{The left-hand side of $\Omega_{3a}$ (or $\widehat{\Omega_{3a}}$) in Fig.~\ref{GRIII}} Seeing the left-hand side of each move of Fig.~\ref{GRIII}, any pair corresponding to two crossings in $\{ c, c', c'' \}$ is \emph{not} parallel; thus, only one in $\{ c, c', c'' \}$ can be smoothened. \subsubsection{The right-hand side of $\Omega_{3a}$ (or $\widehat{\Omega_{3a}}$) in Fig.~\ref{GRIII}} See the right-hand side of each move of Fig.~\ref{GRIII}. Let $\mathcal{C}$ $=$ $\{ c, c', c'' \}$. In order to simplify descriptions, the symbol $\sum_{(c_i, c_j)} \ast$ indicates the sum in the statement. \begin{enumerate} \item {\bf Pair including exactly one element in $\{ c, c', c'' \}$}. Either $\sum_{(c, \sharp )} \ast$, $\sum_{(c', \sharp )} \ast$, or $\sum_{(c'', \sharp )} \ast$ equals the corresponding right-hand side, respectively as in Fig.~\ref{RIII} (this invariance is given by the same reason \cite{HigaNakamuraNakanishiSatoh2022} as that of the original affine index polynomial which is also called the writhe polynomial). \item {\bf Pair including exactly two element in $\{ c, c', c'' \}$.} ($\sum_{(c, c')} \ast$ + $\sum_{(c, c'')} \ast$) + ($\sum_{(c', c)} \ast$ + $\sum_{(c', c'')} \ast$) + ($\sum_{(c'', c)} \ast$ + $\sum_{(c'', c')} \ast$) = $0$ since the first, second, and third round bracket is $0$ as in Fig.~\ref{RIII}, which is essentially the same reason of the invariance of the second Reidemeister moves (Fig.~\ref{RIII}). \end{enumerate} \begin{figure} \includegraphics[width=7cm]{figure9.pdf} \caption{Gauss-diagram presentation $\Omega_{3+-++}$ and $\Omega_{3+-+-}$ (\"{O}stlund notation) corresponding to the Reidemeister move $\Omega_{3a}$ (Polyak notation)}\label{GRIII} \end{figure} \begin{figure} \includegraphics[width=4cm]{figureRIII.pdf} \caption{Oriented Reidemeister move $\Omega_{3a}$ (Case~1); the other case (Case~2) in obtained by reversing orientation (thus figures are omitted)} \label{RIII} \end{figure} \section{Proof of Proposition~\ref{variation}} In this section, we use the list and symbols of Reidemeister moves of \cite[Table~1]{Ostlund2004} except for replacing $\Omega_{3+---}$ as in \cite[Table~1]{Ostlund2004} with $\Omega_{3+-+-}$ as in Figure~\ref{GRIII}. The Reidemeister move $\Omega_{3a}$ in Figure~\ref{RIII} precisely corresponds to 1-component cases: $\Omega_{3+-+*}$ ($* = \pm$), 2-component cases: $\Omega_{III+-+*}$ ($*=b, m, t$) and the 3-component case: $\Omega_{III+-+3}$. \subsection{Proof of the invariance under Reidemeister moves with respect to one/two component(s)} Note that $\lambda^{\sigma}$ and $\nu^{\sigma}$ consist of four ordered Gauss diagrams $\rlb$, $\rlc$, $\rld$, and $\rla$. Each of four types immediately implies the invariances of Reidemeister moves with respect to 1-component and 2-component cases. \subsection{Proof of the invariance under $\Omega_{III+-+3}$} The differences of counted fragments by a single Reidemeister move of type $\Omega_{III+-+3}$ is as in Table~\ref{InvIII}. \begin{table}[h!] \caption{Decrement (left)/Increment (right) on the value under the direction of $\Omega_{III+-+3}$.}\label{InvIII} \begin{tabular}{cccc}\hline Move&\includegraphics[width=3cm]{3compRIIIL.pdf}& $\longrightarrow$ & \includegraphics[width=3cm]{3compRIIIR.pdf} \\ \\ Counted fragment& \rlbfstPP & $\longrightarrow$ & \rlctsfINVPP \\ \hline \\ Counted fragment& \rlastfPM & $\longrightarrow$ & \rlaftsMP \\ \hline \\ Counted fragment& \rldtfsMP & $\longrightarrow$ & \rldsftINVPM \\ \hline \\ \end{tabular} \end{table} \subsubsection{$\lambda^{\sigma}$} Table~\ref{InvIII} implies Table~\ref{InvIIILambda} by replacing labels by new ones. Table~\ref{InvIIILambda} indicates the difference of contributions: vanishing (center)/newborn (right) values. In either center or right column, the sum of two contributions is zero, which implies the invariance. \begin{table}[h!] \caption{Labels switched for checking the invariance of $\lambda^{\sigma}$ (in the rightmost, by relabelling $i'=k, k'=i$, we make it easy.)}\label{InvIIILambda} \begin{tabular}{cccc}\hline Move&\includegraphics[width=3cm]{L3compRIIIL.pdf}& $\longrightarrow$ & \includegraphics[width=3cm]{L3compRIIIR.pdf} \\ \\ Counted fragment& \rlbfstPPLambda & $\longrightarrow$ & \rlctsfINVPPLambda \\ \hline \\ Counted fragment& \rldtfsMPLambda & $\longrightarrow$ & \rldsftINVPMLambda \\ \hline \\ \end{tabular} \end{table} \subsubsection{$\nu^{\sigma}$} Table~\ref{InvIII} implies Table~\ref{InvIIINu} by replacing labels with new ones. Table~\ref{InvIIINu} indicates the difference: vanishing (center)/newborn (right) values. In either center or right column, the sum of two contributions is zero, which implies the invariance. \begin{table}[h!] \caption{Labels switched for checking the invariance of $\nu^{\sigma}$ (in the rightmost, by relabelling $i'=k, k'=i$, we make it easy.)}\label{InvIIINu} \begin{tabular}{cccc}\hline Move&\includegraphics[width=3cm]{N3compRIIIL.pdf}& $\longrightarrow$ & \includegraphics[width=3cm]{N3compRIIIR.pdf} \\ \\ Counted fragment& \rlbfstPPNu & $\longrightarrow$ & \rlctsfINVPPNu \\ \hline \\ Counted fragment& \rlastfPMNu & $\longrightarrow$ & \rlaftsMPNu \\ \hline \\ \end{tabular} \end{table} \section*{Acknowledgements} The author would like to thank Dr.~Atsuhiko Mizusawa for informing him about known results. The work was partially supported by JSPS KAKENHI Grant Number JP20K03604. \bibliographystyle{plain}
{ "redpajama_set_name": "RedPajamaArXiv" }
335
When you are in Catanduanes, stay in a place that will enable you to have easy access to many tourist destinations in the island. That is what the Marem Pension House prides itself. In the heart of the Virac is a colorful building called the Marem Pension House. Its vibrant color is one of its advantages, so catchy that you easily get attracted when you see it. Located in 163 Rizal Avenue, Barangay Sta Cruz St. in Virac, this maze-like building is a home to many travel junkies that are visiting the island of Catanduanes. One thing you will also love about this place is its accessibility to different modes of transportation in the province, especially the tricycle or locally known as "tricy or traysi". A 5 to 15-minute-tricycle ride will bring you to the Center Mall, Sea Breeze Restaurant, Rizal Park, Virac Cathedral, Virac Public Market and even to the gateways of the province, the Virac Seaport and Virac Airport. Just a few meters away from Marem Pension House are the province's Capitol Building and the Museo de Catanduanes. Upon entering the building, a friendly staff will meet you at the front desk. Hanging on the walls are frames of top tourist destinations in Catanduanes that will help you have an idea on what places to visit around. Their hallway is illuminated with blue during night time. Aside from being near to the tourist spots in the island, this place was designed for a homey pleasure that will fit your budget. Room rates start from 250.00 pesos up to 1800.00 pesos. Located at the ground floor is the Double Suite. The room has 2 single beds, a cable TV and a bathroom with hot shower. The room rate is 990 pesos and this includes a complimentary breakfast. If you are looking for a bigger space to stay, the Executive Suite is the perfect crib. It has one queen size bed, a cable TV, a bathroom with hot shower and a refrigerator. This room costs 1050.00 pesos a day. If you are travelling with your family or a large group, the Family Suite can be one of your options. Accommodation is good for 4 persons with two single and one queen size bed. It also has a cable TV and the bathroom is quite big. No worries for cold weather since it has hot shower and a bathtub. You are not away from the beautiful scenery of the province since the room has a veranda for sightseeing. Room rate is 1800.00 pesos. They also have a Family Deluxe room that is good for 3 persons. In includes three single beds, a cable TV and a bathroom. Regular rate is 1500.00 pesos. They have more budget-friendly rooms that are good for backpacking or if travelling alone. The Single Deluxe has one single bed, a cable TV and a bathroom. Complimentary breakfast is also included. Room rate is 730.00 pesos. The Ordinary Room is good for backpacking and a budget travel. It includes an electric fan, one single bed and a common bathroom. Room rate is 250.00 pesos. At the ground floor is a cozy place to dine in, the Marem Restaurant. Other accessible establishments are the Marem Bakeshop. It also has a 24 hr standby generator and security system, a gated parking lot and the best thing is a free WiFi access. They can also guide you for an exclusive beach or/and pool resort rental. For a stress-free travel, they also offer tours for guests. Although it has a modern look outside, the entire building endures a vintage ambiance- from its window panes to the stair railings. Getting help is easy too. Located outside the rooms is a telephone kiosk to call for any assistance. At night, Marem Pension House lights up like a castle. The hotel is where you can relax and enjoy your stay, walk around and discover the vastness of the province. Their hospitality is their key to make Marem your home away from home. Marem Pension House at night.
{ "redpajama_set_name": "RedPajamaC4" }
1,877
I've used garlic to treat my own ear infections, each time with great success. If you don't have access to a doctor, try the humble garlic for a cure and some relief. Garlic is nature's broad-spectrum antibiotic, making it an effective remedy for colds and viral infections. "Jala neti" or nasal irrigation with saltwater works because of the salt, which is a natural anti-bacterial. The flow of salt water through the nasal passage gently flushes dirt, airborne allergens (dust and pollen), pollutants and bacteria-filled mucus. Warm salt water also loosens and thins mucus, making it easier to expel.
{ "redpajama_set_name": "RedPajamaC4" }
7,104
Q: Django data validation in form (admin/auth/user) in my User administration for each individual's page, besides the default django fieldsets, I also have two other inlines (UserProfile and a model called "Extension"). However, whenever I modify fields in the Extension's inline, I want to be able to process/validate all these fields too. UserProfile: user = models.ForeignKey(User, unique=True) client = models.ForeignKey(Client) Extension: user = models.ForeignKey(User) date_created = models.DateTimeField(auto_now_add=True, auto_now=True) number = models.CharField(max_length=16, unique=False) For example, when I'm editing a user's extension numbers, I want to be able to grab all values inside each field (which are dynamic). Right now I'm using self.data[""] like this: extension_fields = [self.data["extension_set-0-number"], self.data["extension_set-1-number"], self.data["extension_set-2-number"]] One problem this poses is that I'm assuming there always will only be 3 fields for extension, which is not always true. How can I loop through each inline field correctly? A: How can I loop through each inline field correctly? You can use a list comprehension to loop through them: extension_fields = [self.data[k] for k in self.data.keys() if 'extension_set' in k] I'm not entirely convinced this is the correct way to implement this, however. You haven't provided enough example code to explain what you're doing exactly. If you're trying to process and validate this data, Django should be doing this for you (probably using a ModelForm). You shouldn't have to be hardcoding this yourself.
{ "redpajama_set_name": "RedPajamaStackExchange" }
5,623
Основна школа Житорађа настала је далеке 1873. године, у оно време била је једна од четири основне сколе у Топлици. У дугом временском периоду, школа је била снажно жаристе просвете, културе, И националних стремљења за село и околину. Истурена одељења Основна школа "Топлички хероји" у Житорађи садржи низ истурених одељења по околним селима, а то су: Јасеница, Влахово, Глашинце, Топлица, Подина, Лукомир, Студенац, Речица, Вољчинце, Пејковац, Стара Божурна, Самариновац, Дражевац, Дубово, Коњарник, Старо Момчилово, Ново Момчилово, Каре, Асановац, Доње Црнатово, Горње Црнатово, Грудаш, Бадњевац, Горњи Дреновац и Доњи Дреновац. Учитељи у Дубовској школи од 1893. до 1910. године, према познатим подацима били су: Танасије Јовановић, Петар Ђаковић, Даница Петровићева, Добросав Радуловић, Димитрије Николић. Школа између два рата Између два светска рата, Основна школа у Дубову имала је два одељења у самом Дубову и по једно издвојено одељење у Коњарнику од 1933, Старом Момчилову од 1933, Новом Момчилову од 1938, Кару од 1938. и Пасјачи од 1938. године. Школа у Дубову радила је у државној згради изграђеној 1921. године, имала је две учионице, канцеларију и ходник, као и стан за учитеља. У Коњарнику, Старом Момчилову, Новом Момчилову и Кару издвојена одељења су рад али у приватним зградама. За време Другог светског рата, од 1941. до 1944. године, основна школа у Дубову је радила у веома отежаним условима, и то како школа у Дубову, тако и истурена одељења у Коњарнику, Старом Момчилову, Новом Момчилову, Кару И Пасјачи. Ипак, школске године су некако завршаване. После ослобођења, од 1944. године, школа у Дубову је наставила рад без истурених одељења у Коњарнику, Старом Момчилову, Новом Момчилову, Кару и Пасјачи. Септембра 1949. године, четвороразредна основна школа у Дубову прерасла је у осмогодишњу. Балет у Дубову Народне новине су 22. септембра 1962. године објавиле чланак под насловом "Балет у Дубову". У чланку се говорило о примедбама културно–уметничких друштава села Житорађа, Пејковац, Дубово и Доње Црнатово. Децембра 1962. године школа у Дубову је постала централна рејонска основна – осмогодишња школа, док су школе у Коњарнику, Старом Момчилову, Новом Момчилову и Асановцу остале непотпуне основне – четвороразредне школе. Од 1964. године школа у Дубову је постала једна од четири основне осморазредне школе у општини Житорађа. Основна школа у Дубову је од 1964. године носила назив: Основна школа "Радош Јовановић Сеља", Дубово. Године 1976. основна школа у Дубову ушла је у састав јединствене основне школе у општини Житорађа, под називом Основна школа "Топлички хероји", Житорађа. Од тада основна школа у Дубову ради као осморазредно одељење. Литература Живојин Станисављевић "Основна школа Житорађа" Топлички
{ "redpajama_set_name": "RedPajamaWikipedia" }
1,746
Q: CodeBuild: Failing as PHP 7.4 cannot be found I have an AWS pipeline established with an EC2 instance deploying a Laravel application on to it. A new package was required that needs PHP7.4. What I'm trying to do: Simply update the PHP version used within my pipeline which is accepted in the AWS guideline. What steps I've taken: I updated my buildspec.yml file to: runtime-versions: php: 7.4 However, I end up with the following error in the log: What I've tried: I added pre-build commands to update the repositories (as below) pre_build: run-as: ec2-user commands: - apt-get update - apt-get upgrade -y - apt-get install -y php7.4-cli php7.4-zip - phpenmod zip Essentially, it looks like the instance cannot find the version of PHP. Has anyone encountered this before and if so, how can I update the version without starting from scratch? A: There is no php 7.4 runtime in CodeBuild Linux curated images. I have requested a document update via GitHub link at bottom of page [1]. For your use case, I would recommend to update the Image of Environment to custom image 'php:7.4.3-cli' which is hosted on Dockerhub to use this image as your build container. I tested this with a simple buildspec: version: 0.2 phases: install: commands: - php -v build: commands: - date Result: [Container] 2020/03/05 14:49:57 Entering phase INSTALL [Container] 2020/03/05 14:49:57 Running command php -v PHP 7.4.3 (cli) (built: Feb 26 2020 12:05:30) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies Ref: [1] https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html A: You can use php 7.4 in build images Amazon Linux 2 standard:3.0 and Ubuntu standard:4.0 for more details follow the link below. https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
{ "redpajama_set_name": "RedPajamaStackExchange" }
6,045
Employers often reward employees with office parties at the end of the year. An office party during the festive season can provide an organisational morale boost and offer a way to thank employees for their hard work during the year. It can also create a degree of social cohesion among employees by providing a glimpse of colleagues' lighter sides in a relaxed social atmosphere. Unfortunately, the nature of an office Christmas party is such that there also a number of legal pitfalls – especially where alcohol is concerned – which many HR professionals agree are surprisingly difficult to manage. What are the Potential Office Party Pitfalls? Issues may arise as early as the invitations to the party being sent out. Insofar as Christmas is a Christian holiday, employees should not be pressured into attending if they are not inclined to attend on religious grounds. In the same way, many employees will have familial responsibilities outside of work so exerting pressure on any employees to attend is generally not advisable. In terms of placing office Christmas decorations, as long as risk assessments are carried out in accordance with accepted standards then it should be rare that an employer will breach health and safety rules. Specifically, however, when putting up Christmas lights it will be rare that the employer's insurance policy will cover damage caused by untested electrical equipment. As such, any festive lights should either be tested or made sure to be switched off and unplugged prior to the office emptying. The Christmas party itself, and what occurs during it, is probably the biggest source of potential legal issues and claims. Given that Christmas parties will in most cases be seen to be a legal extension of the office environment, employers will remain liable for acts of assault, discrimination, and harassment carried out at the party. Therefore, all employees should have very clear guidance on what is not acceptable behaviour during the event, making clear that disciplinary procedures will be followed despite the seeming festive nature of the party. As disciplinary procedures must be followed – for example in the event of employees fighting, consuming excessive amounts of alcohol and/or illegal substances, inappropriate behaviour, sexist or racist remarks – it is best practice to ensure that guidelines are given to employees beforehand. This should highlight obvious potential issues associated with excessive alcohol consumption, especially if there is a free bar. Placing restrictions on the amounts of free alcohol to be consumed is an easy way to reduce the risk of legal problems. Alternatively, managers should be asked to take responsibility for recommending that employees lay off the drink if they seem to be overdoing it. It should be noted that a free bar in itself has been seen at tribunal as the employer condoning the effects of excessive alcohol consumption. Employers concerned about this may wish to consider avoiding a free bar altogether to prevent various problems arising. Organisers should also remember to provide an abundance of alcohol-free drinks in order to avoid discriminating against employees who, for various reasons, cannot consume alcohol. For specialist advice in the run up to the festive season contact Aneil Balgobin via e-mail ABalgobin@rollingsons.co.uk or by telephone on 0207 611 4848.
{ "redpajama_set_name": "RedPajamaC4" }
9,596
CTY, sigle composé des trois lettres C, T et Y, peut faire référence à : Compagnie des transports du yonnais. CTY est aussi un code qui peut faire référence à : , dans le Comté de Dixie, en Floride, aux États-Unis, selon la liste des codes AITA des aéroports. Code IATA des aéroports
{ "redpajama_set_name": "RedPajamaWikipedia" }
3,706
\section{} \label{} \section{Introduction} \file{elsarticle.cls} is a thoroughly re-written document class for formatting \LaTeX{} submissions to Elsevier journals. The class uses the environments and commands defined in \LaTeX{} kernel without any change in the signature so that clashes with other contributed \LaTeX{} packages such as \file{hyperref.sty}, \file{preview-latex.sty}, etc., will be minimal. \file{elsarticle.cls} is primarily built upon the default \file{article.cls}. This class depends on the following packages for its proper functioning: \begin{enumerate} \item \file{natbib.sty} for citation processing; \item \file{geometry.sty} for margin settings; \item \file{fleqn.clo} for left aligned equations; \item \file{graphicx.sty} for graphics inclusion; \item \file{txfonts.sty} optional font package, if the document is to be formatted with Times and compatible math fonts; \item \file{hyperref.sty} optional packages if hyperlinking is required in the document; \item \file{endfloat.sty} optional packages if floats to be placed at end of the PDF. \end{enumerate} All the above packages (except some optional packages) are part of any standard \LaTeX{} installation. Therefore, the users need not be bothered about downloading any extra packages. Furthermore, users are free to make use of \textsc{ams} math packages such as \file{amsmath.sty}, \file{amsthm.sty}, \file{amssymb.sty}, \file{amsfonts.sty}, etc., if they want to. All these packages work in tandem with \file{elsarticle.cls} without any problems. \section{Major Differences} Following are the major differences between \file{elsarticle.cls} and its predecessor package, \file{elsart.cls}: \begin{enumerate}[\textbullet] \item \file{elsarticle.cls} is built upon \file{article.cls} while \file{elsart.cls} is not. \file{elsart.cls} redefines many of the commands in the \LaTeX{} classes/kernel, which can possibly cause surprising clashes with other contributed \LaTeX{} packages; \item provides preprint document formatting by default, and optionally formats the document as per the final style of models $1+$, $3+$ and $5+$ of Elsevier journals; \item some easier ways for formatting \verb+list+ and \verb+theorem+ environments are provided while people can still use \file{amsthm.sty} package; \item \file{natbib.sty} is the main citation processing package which can comprehensively handle all kinds of citations and works perfectly with \file{hyperref.sty} in combination with \file{hypernat.sty}; \item long title pages are processed correctly in preprint and final formats. \end{enumerate} \section{Installation} The package is available at author resources page at Elsevier (\url{http://www.elsevier.com/locate/latex}). It can also be found in any of the nodes of the Comprehensive \TeX{} Archive Network (\textsc{ctan}), one of the primary nodes being \url{http://tug.ctan.org/tex-archive/macros/latex/contrib/elsarticle/}. Please download the \file{elsarticle.dtx} which is a composite class with documentation and \file{elsarticle.ins} which is the \LaTeX{} installer file. When we compile the \file{elsarticle.ins} with \LaTeX{} it provides the class file, \file{elsarticle.cls} by stripping off all the documentation from the \verb+*.dtx+ file. The class may be moved or copied to a place, usually, \verb+$TEXMF/tex/latex/elsevier/+, or a folder which will be read by \LaTeX{} during document compilation. The \TeX{} file database needs updation after moving/copying class file. Usually, we use commands like \verb+mktexlsr+ or \verb+texhash+ depending upon the distribution and operating system. \section{Usage}\label{sec:usage} The class should be loaded with the command: \begin{vquote} \documentclass[<options>]{elsarticle} \end{vquote} \noindent where the \verb+options+ can be the following: \begin{description} \item [{\tt\color{verbcolor} preprint}] default option which format the document for submission to Elsevier journals. \item [{\tt\color{verbcolor} review}] similar to the \verb+preprint+ option, but increases the baselineskip to facilitate easier review process. \item [{\tt\color{verbcolor} 1p}] formats the article to the look and feel of the final format of model 1+ journals. This is always single column style. \item [{\tt\color{verbcolor} 3p}] formats the article to the look and feel of the final format of model 3+ journals. If the journal is a two column model, use \verb+twocolumn+ option in combination. \item [{\tt\color{verbcolor} 5p}] formats for model 5+ journals. This is always of two column style. \item [{\tt\color{verbcolor} authoryear}] author-year citation style of \file{natbib.sty}. If you want to add extra options of \file{natbib.sty}, you may use the options as comma delimited strings as arguments to \verb+\biboptions+ command. An example would be: \end{description} \begin{vquote} \biboptions{longnamesfirst,angle,semicolon} \end{vquote} \begin{description} \item [{\tt\color{verbcolor} number}] numbered citation style. Extra options can be loaded with\linebreak \verb+\biboptions+ command. \item [{\tt\color{verbcolor} sort\&compress}] sorts and compresses the numbered citations. For example, citation [1,2,3] will become [1--3]. \item [{\tt\color{verbcolor} longtitle}] if front matter is unusually long, use this option to split the title page across pages with the correct placement of title and author footnotes in the first page. \item [{\tt\color{verbcolor} times}] loads \file{txfonts.sty}, if available in the system to use Times and compatible math fonts. \item [{\tt\color{verbcolor} reversenotenum}] Use alphabets as author--affiliation linking labels and use numbers for author footnotes. By default, numbers will be used as author--affiliation linking labels and alphabets for author footnotes. \item [{\tt\color{verbcolor} lefttitle}] To move title and author/affiliation block to flushleft. \verb+centertitle+ is the default option which produces center alignment. \item [{\tt\color{verbcolor} endfloat}] To place all floats at the end of the document. \item [{\tt\color{verbcolor} nonatbib}] To unload natbib.sty. \item [{\tt\color{verbcolor} doubleblind}] To hide author name, affiliation, email address etc. for double blind refereeing purpose. \item[] All options of \file{article.cls} can be used with this document class. \item[] The default options loaded are \verb+a4paper+, \verb+10pt+, \verb+oneside+, \verb+onecolumn+ and \verb+preprint+. \end{description} \section{Frontmatter} There are two types of frontmatter coding: \begin{enumerate}[(1)] \item each author is connected to an affiliation with a footnote marker; hence all authors are grouped together and affiliations follow; \pagebreak \item authors of same affiliations are grouped together and the relevant affiliation follows this group. \end{enumerate} An example of coding the first type is provided below. \begin{vquote} \title{This is a specimen title\tnoteref{t1,t2}} \tnotetext[t1]{This document is the results of the research project funded by the National Science Foundation.} \tnotetext[t2]{The second title footnote which is a longer text matter to fill through the whole text width and overflow into another line in the footnotes area of the first page.} \end{vquote} \begin{vquote} \author[1]{Jos Migchielsen\corref{cor1}% \fnref{fn1}} \ead{J.Migchielsen@elsevier.com} \author[2]{CV Radhakrishnan\fnref{fn2}} \ead{cvr@sayahna.org} \author[3]{CV Rajagopal\fnref{fn1,fn3}} \ead[url]{www.stmdocs.in} \end{vquote} \begin{vquote} \cortext[cor1]{Corresponding author} \fntext[fn1]{This is the first author footnote.} \fntext[fn2]{Another author footnote, this is a very long footnote and it should be a really long footnote. But this footnote is not yet sufficiently long enough to make two lines of footnote text.} \fntext[fn3]{Yet another author footnote.} \address[1]{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam, The Netherlands} \address[2]{Sayahna Foundations, JWRA 34, Jagathy, Trivandrum 695014, India} \address[3]{STM Document Engineering Pvt Ltd., Mepukada, Malayinkil, Trivandrum 695571, India} \end{vquote} The output of the above \TeX{} source is given in Clips~\ref{clip1} and \ref{clip2}. The header portion or title area is given in Clip~\ref{clip1} and the footer area is given in Clip~\ref{clip2}. \deforange{blue!70} \src{Header of the title page.} \includeclip{1}{130 612 477 707}{1psingleauthorgroup.pdf \deforange{orange} \deforange{blue!70} \src{Footer of the title page.} \includeclip{1}{93 135 499 255}{1pseperateaug.pdf \deforange{orange} Most of the commands such as \verb+\title+, \verb+\author+, \verb+\address+ are self explanatory. Various components are linked to each other by a label--reference mechanism; for instance, title footnote is linked to the title with a footnote mark generated by referring to the \verb+\label+ string of the \verb=\tnotetext=. We have used similar commands such as \verb=\tnoteref= (to link title note to title); \verb=\corref= (to link corresponding author text to corresponding author); \verb=\fnref= (to link footnote text to the relevant author names). \TeX{} needs two compilations to resolve the footnote marks in the preamble part. Given below are the syntax of various note marks and note texts. \begin{vquote} \tnoteref{<label(s)>} \corref{<label(s)>} \fnref{<label(s)>} \tnotetext[<label>]{<title note text>} \cortext[<label>]{<corresponding author note text>} \fntext[<label>]{<author footnote text>} \end{vquote} \noindent where \verb=<label(s)>= can be either one or more comma delimited label strings. The optional arguments to the \verb=\author= command holds the ref label(s) of the address(es) to which the author is affiliated while each \verb=\address= command can have an optional argument of a label. In the same manner, \verb=\tnotetext=, \verb=\fntext=, \verb=\cortext= will have optional arguments as their respective labels and note text as their mandatory argument. The following example code provides the markup of the second type of author-affiliation. \begin{vquote} \author{Jos Migchielsen\corref{cor1}% \fnref{fn1}} \ead{J.Migchielsen@elsevier.com} \address{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam, The Netherlands} \author{CV Radhakrishnan\fnref{fn2}} \ead{cvr@sayahna.org} \address{Sayahna Foundations, JWRA 34, Jagathy, Trivandrum 695014, India} \author{CV Rajagopal\fnref{fn1,fn3}} \ead[url]{www.stmdocs.in} \address{STM Document Engineering Pvt Ltd., Mepukada, Malayinkil, Trivandrum 695571, India} \end{vquote} \vspace*{-.5pc} \begin{vquote} \cortext[cor1]{Corresponding author} \fntext[fn1]{This is the first author footnote.} \fntext[fn2]{Another author footnote, this is a very long footnote and it should be a really long footnote. But this footnote is not yet sufficiently long enough to make two lines of footnote text.} \end{vquote} The output of the above \TeX{} source is given in Clip~\ref{clip3}. \deforange{blue!70} \src{Header of the title page..} \includeclip{1}{119 563 468 709}{1pseperateaug.pdf \deforange{orange} \pagebreak Clip~\ref{clip4} shows the output after giving \verb+doubleblind+ class option. \deforange{blue!70} \src{Double blind article} \includeclip{1}{124 567 477 670}{elstest-1pdoubleblind.pdf \deforange{orange} \vspace*{-.5pc} The frontmatter part has further environments such as abstracts and keywords. These can be marked up in the following manner: \begin{vquote} \begin{abstract} In this work we demonstrate the formation of a new type of polariton on the interface between a .... \end{abstract} \end{vquote} \vspace*{-.5pc} \begin{vquote} \begin{keyword} quadruple exiton \sep polariton \sep WGM \end{keyword} \end{vquote} \noindent Each keyword shall be separated by a \verb+\sep+ command. \textsc{msc} classifications shall be provided in the keyword environment with the commands \verb+\MSC+. \verb+\MSC+ accepts an optional argument to accommodate future revisions. eg., \verb=\MSC[2008]=. The default is 2000.\looseness=-1 \subsection{New page} Sometimes you may need to give a page-break and start a new page after title, author or abstract. Following commands can be used for this purpose. \begin{vquote} \newpageafter{title} \newpageafter{author} \newpageafter{abstract} \end{vquote} \begin{itemize} \leftskip-2pc \item [] {\tt\color{verbcolor} \verb+\newpageafter{title}+} typeset the title alone on one page. \item [] {\tt\color{verbcolor} \verb+\newpageafter{author}+} typeset the title and author details on one page. \item [] {\tt\color{verbcolor} \verb+\newpageafter{abstract}+} typeset the title, author details and abstract \& keywords one one page. \end{itemize} \section{Floats} {Figures} may be included using the command, \verb+\includegraphics+ in combination with or without its several options to further control graphic. \verb+\includegraphics+ is provided by \file{graphic[s,x].sty} which is part of any standard \LaTeX{} distribution. \file{graphicx.sty} is loaded by default. \LaTeX{} accepts figures in the postscript format while pdf\LaTeX{} accepts \file{*.pdf}, \file{*.mps} (metapost), \file{*.jpg} and \file{*.png} formats. pdf\LaTeX{} does not accept graphic files in the postscript format. The \verb+table+ environment is handy for marking up tabular material. If users want to use \file{multirow.sty}, \file{array.sty}, etc., to fine control/enhance the tables, they are welcome to load any package of their choice and \file{elsarticle.cls} will work in combination with all loaded packages. \section[Theorem and ...]{Theorem and theorem like environments} \file{elsarticle.cls} provides a few shortcuts to format theorems and theorem-like environments with ease. In all commands the options that are used with the \verb+\newtheorem+ command will work exactly in the same manner. \file{elsarticle.cls} provides three commands to format theorem or theorem-like environments: \begin{vquote} \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma} \newdefinition{rmk}{Remark} \newproof{pf}{Proof} \newproof{pot}{Proof of Theorem \ref{thm2}} \end{vquote} The \verb+\newtheorem+ command formats a theorem in \LaTeX's default style with italicized font, bold font for theorem heading and theorem number at the right hand side of the theorem heading. It also optionally accepts an argument which will be printed as an extra heading in parentheses. \begin{vquote} \begin{thm} For system (8), consensus can be achieved with $\|T_{\omega z}$ ... \begin{eqnarray}\label{10} .... \end{eqnarray} \end{thm} \end{vquote} Clip~\ref{clip5} will show you how some text enclosed between the above code\goodbreak \noindent looks like: \vspace*{6pt} \deforange{blue!70} \src{{\ttfamily\color{verbcolor}\expandafter\@gobble\string\\ newtheorem}} \includeclip{2}{1 1 453 120}{jfigs.pdf} \deforange{orange} The \verb+\newdefinition+ command is the same in all respects as its\linebreak \verb+\newtheorem+ counterpart except that the font shape is roman instead of italic. Both \verb+\newdefinition+ and \verb+\newtheorem+ commands automatically define counters for the environments defined. \vspace*{6pt} \deforange{blue!70} \src{{\ttfamily\color{verbcolor}\expandafter\@gobble\string\\ newdefinition}} \includeclip{1}{1 1 453 105}{jfigs.pdf} \deforange{orange} The \verb+\newproof+ command defines proof environments with upright font shape. No counters are defined. \vspace*{6pt} \deforange{blue!70} \src{{\ttfamily\color{verbcolor}\expandafter\@gobble\string\\ newproof}} \includeclip{3}{1 1 453 65}{jfigs.pdf} \deforange{orange} Users can also make use of \verb+amsthm.sty+ which will override all the default definitions described above. \section[Enumerated ...]{Enumerated and Itemized Lists} \file{elsarticle.cls} provides an extended list processing macros which makes the usage a bit more user friendly than the default \LaTeX{} list macros. With an optional argument to the \verb+\begin{enumerate}+ command, you can change the list counter type and its attributes. \begin{vquote} \begin{enumerate}[1.] \item The enumerate environment starts with an optional argument `1.', so that the item counter will be suffixed by a period. \item You can use `a)' for alphabetical counter and '(i)' for roman counter. \begin{enumerate}[a)] \item Another level of list with alphabetical counter. \item One more item before we start another. \end{vquote} \deforange{blue!70} \src{List -- Enumerate} \includeclip{4}{1 1 453 185}{jfigs.pdf} \deforange{orange} Further, the enhanced list environment allows one to prefix a string like `step' to all the item numbers. \begin{vquote} \begin{enumerate}[Step 1.] \item This is the first step of the example list. \item Obviously this is the second step. \item The final step to wind up this example. \end{enumerate} \end{vquote} \deforange{blue!70} \src{List -- enhanced} \includeclip{5}{1 1 313 83}{jfigs.pdf} \deforange{orange} \section{Cross-references} In electronic publications, articles may be internally hyperlinked. Hyperlinks are generated from proper cross-references in the article. For example, the words \textcolor{black!80}{Fig.~1} will never be more than simple text, whereas the proper cross-reference \verb+\ref{tiger}+ may be turned into a hyperlink to the figure itself: \textcolor{blue}{Fig.~1}. In the same way, the words \textcolor{blue}{Ref.~[1]} will fail to turn into a hyperlink; the proper cross-reference is \verb+\cite{Knuth96}+. Cross-referencing is possible in \LaTeX{} for sections, subsections, formulae, figures, tables, and literature references. \section[Mathematical ...]{Mathematical symbols and formulae} Many physical/mathematical sciences authors require more mathematical symbols than the few that are provided in standard \LaTeX. A useful package for additional symbols is the \file{amssymb} package, developed by the American Mathematical Society. This package includes such oft-used symbols as $\lesssim$ (\verb+\lesssim+), $\gtrsim$ (\verb+\gtrsim+) or $\hbar$ (\verb+\hbar+). Note that your \TeX{} system should have the \file{msam} and \file{msbm} fonts installed. If you need only a few symbols, such as $\Box$ (\verb+\Box+), you might try the package \file{latexsym}. Another point which would require authors' attention is the breaking up of long equations. When you use \file{elsarticle.cls} for formatting your submissions in the \verb+preprint+ mode, the document is formatted in single column style with a text width of 384pt or 5.3in. When this document is formatted for final print and if the journal happens to be a double column journal, the text width will be reduced to 224pt at for 3+ double column and 5+ journals respectively. All the nifty fine-tuning in equation breaking done by the author goes to waste in such cases. Therefore, authors are requested to check this problem by typesetting their submissions in final format as well just to see if their equations are broken at appropriate places, by changing appropriate options in the document class loading command, which is explained in section~\ref{sec:usage}, \nameref{sec:usage}. This allows authors to fix any equation breaking problem before submission for publication. \file{elsarticle.cls} supports formatting the author submission in different types of final format. This is further discussed in section \ref{sec:final}, \nameref{sec:final}. \subsection*{Displayed equations and double column journals} Many Elsevier journals print their text in two columns. Since the preprint layout uses a larger line width than such columns, the formulae are too wide for the line width in print. Here is an example of an equation (see equation 6) which is perfect in a single column preprint format: \bigskip \setlength\Sep{6pt} \src{See equation (6)} \deforange{blue!70} \includeclip{4}{105 500 500 700}{1psingleauthorgroup.pdf} \deforange{orange} \noindent When this document is typeset for publication in a model 3+ journal with double columns, the equation will overlap the second column text matter if the equation is not broken at the appropriate location. \vspace*{6pt} \deforange{blue!70} \src{See equation (6) overprints into second column} \includeclip{3}{59 421 532 635}{elstest-3pd.pdf} \deforange{orange} \vspace*{6pt} \noindent The typesetter will try to break the equation which need not necessarily be to the liking of the author or as it happens, typesetter's break point may be semantically incorrect. Therefore, authors may check their submissions for the incidence of such long equations and break the equations at the correct places so that the final typeset copy will be as they wish. \section{Bibliography} Three bibliographic style files (\verb+*.bst+) are provided --- \file{elsarticle-num.bst}, \file{elsarticle-num-names.bst} and \file{elsarticle-harv.bst} --- the first one can be used for the numbered scheme, second one for numbered with new options of \file{natbib.sty}. The third one is for the author year scheme. In \LaTeX{} literature, references are listed in the \verb+thebibliography+ environment. Each reference is a \verb+\bibitem+ and each \verb+\bibitem+ is identified by a label, by which it can be cited in the text: \verb+\bibitem[Elson et al.(1996)]{ESG96}+ is cited as \verb+\citet{ESG96}+. \noindent In connection with cross-referencing and possible future hyperlinking it is not a good idea to collect more that one literature item in one \verb+\bibitem+. The so-called Harvard or author-year style of referencing is enabled by the \LaTeX{} package \file{natbib}. With this package the literature can be cited as follows: \begin{enumerate}[\textbullet] \item Parenthetical: \verb+\citep{WB96}+ produces (Wettig \& Brown, 1996). \item Textual: \verb+\citet{ESG96}+ produces Elson et al. (1996). \item An affix and part of a reference: \verb+\citep[e.g.][Ch. 2]{Gea97}+ produces (e.g. Governato et al., 1997, Ch. 2). \end{enumerate} In the numbered scheme of citation, \verb+\cite{<label>}+ is used, since \verb+\citep+ or \verb+\citet+ has no relevance in the numbered scheme. \file{natbib} package is loaded by \file{elsarticle} with \verb+numbers+ as default option. You can change this to author-year or harvard scheme by adding option \verb+authoryear+ in the class loading command. If you want to use more options of the \file{natbib} package, you can do so with the \verb+\biboptions+ command, which is described in the section \ref{sec:usage}, \nameref{sec:usage}. For details of various options of the \file{natbib} package, please take a look at the \file{natbib} documentation, which is part of any standard \LaTeX{} installation. In addition to the above standard \verb+.bst+ files, there are 10 journal-specific \verb+.bst+ files also available. Instruction for using these \verb+.bst+ files can be found at \href{http://support.stmdocs.in/wiki/index.php?title=Model-wise_bibliographic_style_files} {http://support.stmdocs.in} \section{Final print}\label{sec:final} The authors can format their submission to the page size and margins of their preferred journal. \file{elsarticle} provides four class options for the same. But it does not mean that using these options you can emulate the exact page layout of the final print copy. \lmrgn=3em \begin{description} \item [\texttt{1p}:] $1+$ journals with a text area of 384pt $\times$ 562pt or 13.5cm $\times$ 19.75cm or 5.3in $\times$ 7.78in, single column style only. \item [\texttt{3p}:] $3+$ journals with a text area of 468pt $\times$ 622pt or 16.45cm $\times$ 21.9cm or 6.5in $\times$ 8.6in, single column style. \item [\texttt{twocolumn}:] should be used along with 3p option if the journal is $3+$ with the same text area as above, but double column style. \item [\texttt{5p}:] $5+$ with text area of 522pt $\times$ 682pt or 18.35cm $\times$ 24cm or 7.22in $\times$ 9.45in, double column style only. \end{description} Following pages have the clippings of different parts of the title page of different journal models typeset in final format. Model $1+$ and $3+$ will have the same look and feel in the typeset copy when presented in this document. That is also the case with the double column $3+$ and $5+$ journal article pages. The only difference will be wider text width of higher models. Therefore we will look at the different portions of a typical single column journal page and that of a double column article in the final format. \begin{center} \hypertarget{bsc}{} \hyperlink{sc}{ {\bf [Specimen single column article -- Click here]} } \hypertarget{bsc}{} \hyperlink{dc}{ {\bf [Specimen double column article -- Click here]} } \end{center} \src{}\hypertarget{sc}{} \deforange{blue!70} \hyperlink{bsc}{\includeclip{1}{88 120 514 724}{elstest-1p.pdf}} \deforange{orange} \src{}\hypertarget{dc}{} \deforange{blue!70} \hyperlink{bsc}{\includeclip{1}{27 61 562 758}{elstest-5p.pdf}} \deforange{orange} \end{document} \section{} \label{} \section{} \label{} \section{Introduction} Much work has been done to solve the open and closed set camera identification problem \cite{lukas2006digital, alles2009source, knight2009analysis, geradts2001methods, dirik2008digital}. One of the most promising methods used to identify an image uniquely to not just a particular make or model of camera but the unique image sensor itself is that of photo-response non-uniformity noise (PRNU) or sensor pattern noise (SPN) \cite{lukas2006digital}. While blind source camera identification has been used for some time as a reliable and accepted method for legal purposes \cite{strachan2009}, there are untested scenarios within the existing literature that provide a level of uncertainty. It is widely accepted best practice to identify any source of error within forensic tools and provide methods for their mitigation \cite{SWGDE_ErrorMit}. There still remains questions regarding the science of the method due to high-frequency components of the image remaining within either the image fingerprint, the camera reference pattern or both. These high frequency components include but are not limited to image compression artefacts \cite{alles2009source}, dark current \cite{holst2007cmos}, amplifier noise \cite{holst2007cmos}, and lens and optical effects \cite{knight2009analysis} including dust \cite{dirik2008digital}. These high frequency components can corrupt the fingerprint if their energy dominates the unique signal and are significantly uncorrelated to the sensor. In this paper we aim to isolate a source of error from blind source camera identification and, applying principles of signal processing, demonstrate the energy distribution to the various traces that the SPN method is capable of isolating. While much is known about the mathematical design of lenses, only recently have image analysts begun to study their unique geometric effects to solve the camera identity problem \cite{san2006source, johnson2006exposing}. Lens aberrations have successfully been used in image linking \cite{san2006source} and identifying copy paste forgeries \cite{johnson2006exposing}. This is because lenses create artefacts in an image known as Seidel Aberrations \cite{Seidel_1857}. These aberrations describe how each ray of light travelling through a lens deviates in some manner from the optical axis and is unique to a lens system due to the multiple lenses used in combination \cite{jenkins1937fundamentals}. While this method is successful at lens identification, it provides little information about the specific image sensor in question since lens systems are easily substituted. \begin{figure*}[!t] \centering \includegraphics[width=0.8\textwidth]{AdditiveNoiseModel-Full} \caption{The noise residue model as proposed in our work based on the system noise equations from \cite{holst2007cmos}. The dark grey boxes indicate sources of noise that can be easily mitigated. Random processes are mitigated through frame averaging \cite{holst2007cmos} while RAW format images remove digital processing artefacts\cite{knight2009analysis}. Camera Noises introduced through computer algorithms such as demosaicking, dynamic range adjustments and downsampling are controlled through correct choice of camera hardware values prior to imaging \cite{holst2007cmos}. The low-frequency components of the scene content and all other sources of noise are removed due to the high-pass filter that the images are passed through to obtain the noise residue.} \label{newModel-isolation} \end{figure*} While an abstract model of noise within image sensors has been developed as seen in Figure \ref{newModel-isolation}, to determine which source dominates a complete signal-to-noise ratio analysis must be undertaken \cite{holst2007cmos}. In this paper, we begin this work by limiting ourselves to evaluating the contribution of the lens within a noise residue to ascertain if contamination is possible with lens substitution. The next section provides an overview of how the noise residue is obtained and describes the work that has already been done in isolating the contaminating effects within this fingerprint. In Section \ref{sec:background} we describe a new noise model for the noise residue based off the work of \cite{holst2007cmos} that is more inclusive of the high-frequency leakage seen in \cite{lukas2006digital}. We describe our lens isolation experiments in Section \ref{sec:experimentsetup} in which we use a physical filter to remove all contributions from Seidel aberrations. The results of these experiments are discussed in Section \ref{sec:resultsanddiscussion} before concluding in Section \ref{sec:conclusion}. In the sections which follow we consider all operations as element-wise matrix operations unless specifically expressed otherwise. Boldface is used to denote $m\times n$ vectors. The product between two vectors is assumed to be the vector product $ \mathbf{x}\odot \mathbf{y} = \sum^n_{i=1} \mathbf{X}[i]\mathbf{Y}[i] $ where $i$ is the i'th element of the vector. $||\mathbf{X}|| = \sqrt{\mathbf{X}\odot <{X}>}$ is used to denote the argument of the vector $\mathbf{X}$, and the mean value of the vector $\mathbf{X}$ is indicated by$\mathbf{<{X}>}$. Correlation between two vectors is the cross correlation: \begin{displaymath} corr(X,Y) = \frac{(\mathbf{X}-{\mathbf{<{X}>}})\odot (\mathbf{Y}-{\mathbf{<{Y}>}})}{||\mathbf{X}- {\mathbf{<{X}>}}||\odot||\mathbf{Y}-{\mathbf{<{Y}>}}||} \nonumber \end{displaymath} \section{Background}\label{sec:background} We model the signals contained within a single image as an additive signal model based on \cite{holst2007cmos} and shown in Figure \ref{newModel-isolation}. This expands upon the model proposed by \cite{lukas2006digital} as shown in Figure \ref{oldModel}. \begin{figure}[!t] \centering \includegraphics[width=21pc]{FPNBreakDown-LUKASOLDMODEL} \caption[Luk\'{a}\v{s} \emph{et al} noise model]{The additive noise model as proposed by Luk\'{a}\v{s} \emph{et al} in their seminal work\cite{lukas2006digital}} \label{oldModel} \end{figure} Quoting levels of noise in terms of electrons at the level of image sensor output, the noise magnitude is the root mean square value and the sources are expressed as the root sum of the squares and added in quadrature where appropriate we obtain the following: \begin{align*} \begin{split} <\mathbf{N_{SYS}}>= &\sqrt{<\mathbf{n^2_1}> + ... + <\mathbf{n^2_i}>} \\ &\overline{ + ... + <\mathbf{n^2_N}>} \end{split} \end{align*} Where $ <\mathbf{n^2_i}> $ is the variance of noise source $ i $ and $ <\mathbf{N_{SYS}}> $ is the standard deviation measured in RMS units for the entire system. Substituting for the various sources of noise identified in Figure \ref{newModel-isolation} : \begin{align} \begin{split} <\mathbf{N^2_{SYS}}{>} {\medspace} {=} &<\mathbf{n^2_{RANDOM}}> + <\mathbf{n^2_{IMAGE}}> \\ {\medspace}&{+}\: <\mathbf{n^2_{DIGITAL}}> + <\mathbf{n^2_{LOS}}> \\ {\medspace}&{+}\: <\mathbf{n^2_{SPN}}> \end{split} \end{align} Since SPN is the signal we wish to isolate we deviate from traditional noise models to include the image as a noise source where $\mathbf{n_{IMAGE}}$ is the high and low frequency components of the scene being imaged, $\mathbf{n_{DIGITAL}}$ are the noise sources due to the digital processing pipeline, $\mathbf{n_{LOS}}$ is the Lens Optical System (LOS) , $\mathbf{n_{SPN}}$ is the contribution from SPN being the addition of dark current (FPN) and PRNU: \begin{align}\label{2} \begin{split} <\mathbf{n^2_{SPN}}>{\medspace} {=} &<\mathbf{n^2_{FPN}}> + <\mathbf{n^2_{PRNU}}> \end{split} \end{align} and $\mathbf{n_{RANDOM}}$ is the sources of noise able to be mitigated through frame averaging represented by: \begin{align}\label{3} \begin{split} <\mathbf{n^2_{RANDOM}}{>} {\medspace} {=} &<\mathbf{n^2_{SHOT}}> + <\mathbf{n^2_{A}}> \\ {\medspace}&{+}\: <\mathbf{n^2_{ADC}}> + <\mathbf{n^2_{\frac{1}{f}}}> \\ {\medspace}&{+}\:<\mathbf{n^2_{RESET}}> \end{split} \end{align} For our usage, we agree with the findings of \cite{holst2007cmos} as shown in our theoretical model of the noise sources contained within the noise residue after following the de-noising method in \cite{lukas2006digital}. We break down the signals within our of noise residue as being comprised of three main areas: SPN or those due to the sensor, those due to the LOS, and the high-frequency components of the scene content. We illustrate this in Figure \ref{noiseresidue}. From the sensor, we follow the model as proposed in \cite{lukas2006digital} and break the Sensor level noise down to PRNU and Dark Current. For ease of modelling, we also include dust on the sensor as per \cite{lukas2006digital} noting that dust modifies the PRNU response since light is blocked from the sensor. The LOS is comprised of two levels. These are lens dust or misalignment, and Seidel aberrations cause by design errors during lens manufacture. Both aspects are high-frequency components only due to the filter $f$ that the system is run through to obtain the noise residue. To simplify the model, acknowledging we introduce a source of possible error in doing so, we focus our attention on the sections of the model that positively correlate with an individual image under test (IUT). \cite{lukas2006digital} using \cite{holst2007cmos} identified that the only sources of noise not reduced through frame averaging were dark current and PRNU. This was further refined in \cite{knight2009analysis} to eliminate compression level artefacts through the use of raw images. LOS aberrations and components of the scene remain (Figure \ref{noiseresidue}). The scene components are limited to only the spatial high-frequency components since the image has been high-pass filtered. The model when a reference pattern is compared to a IUT fingerprint is therefore considered as follows: \begin{align}\label{4} \begin{split} <\mathbf{N^2_{SYS}}{>} {\medspace} {=} &<\mathbf{n^2_{SPN}}> + <\mathbf{n^2_{LOS}}> \\ {\medspace}&{+}\: <\mathbf{n^2_{W_{ref}}}> + <\mathbf{n^2_{w}}> \\ \end{split} \end{align} Where $\mathbf{n_{W_{ref}}}$ is the contribution of high-frequency elements from the reference pattern due to the insufficient suppression from frame averaging and $\mathbf{n_{w}}$ is the high-frequency scene components of the IUT. Given that these two sources are uncorrelated we further reduce our model to: \begin{equation}\label{14} <\mathbf{N_{SYS}}^2{>} {\:} {=} <\mathbf{n^2_{SPN}}> + <\mathbf{n^2_{LOS}}>+<\mathbf{n^2_{V}}> \end{equation} From this model, we can determine the contribution of the LOS aberrations within the system to the correlation energy $<\mathbf{N^2_{SYS}}>$. We achieve this through the use of a physical filter (a pinhole lens) thus removing LOS aberrations from the system altogether. \begin{equation}\label{15} <\mathbf{N^2_{SYS}}{>} {\:} {=} <\mathbf{n^2_{SPN}}> +<\mathbf{n^2_{V}}> \end{equation} Given $<\mathbf{n_V}>$ is uncorrelated, the resulting correlation will be directly proportional to a combination of FPN and PRNU. We assume the definition of this as SPN as per \cite{holst2007cmos}. This is the basis of the original method as seen in \cite{lukas2006digital} with differences as explained here. \cite{lukas2006digital} acknowledged that pattern noise is \emph{any noise component that survives frame averaging} and focused on only one part of this theoretical model, pixel non-uniformity noise (PNU). From our use of the model as proposed in \cite{holst2007cmos} it is clear that lens aberrations are involved unless otherwise filtered, which frame averaging does not achieve. \cite{lukas2006digital} assumed the positive match from their method was directly proportional to PNU defined as a sub layer of PRNU caused by the different sensitivity of pixels to light. We do not agree as shown from the theoretical break down above hypothesis that Dark Current and the LOS must be included with appropriate weight. \begin{figure}[!t] \centering \includegraphics[width=21pc]{NoiseResidue} \caption[Noise Residue Model]{The groupings of noise remaining in our noise residue. The grey indicates the sensor specific noise.} \label{noiseresidue} \end{figure} Dark current is generated in multiple places within an image sensor. Generally, three sources of dark current contribute to the total generated by a sensor. These sources are typically the depletion region through the swapping of minority carriers, the diffusion of carriers in the field-free region at saturation (drift current) and on the surface of any oxide layer interface. A complete study of dark current is beyond the scope of this paper but can be read in \cite{widenhorn2002temperature}. Previous work by \cite{kurosawa1999ccd} has presented a hypothesis that dark current could be an effective tool for matching images to a source camera. However, this work is often reduced to pixel defects for matching images as demonstrated in \cite{geradts2001methods}. We propose that even with pixel defects isolated and removed, dark current is a unique trace in itself. This philosophy has previously been proposed. In \cite{kurosawa2013casestudies} the concept of a hybrid model was explored were the individual traces of PRNU and DSN were combined to create a new method that ultimately ``had higher discrimination capability than the method using pixel non-uniformity when the number of recorded image was small''. By isolating lens effects and dark current from the PRNU trace we illustrate why this is the case further demonstrating the need for more work to understand the science behind the sensor pattern method for uniquely solving the blind source camera identification problem. \section{Methods}\label{sec:experimentsetup} Six Sony IMX219PQ CMOS image sensors (CIS) with integrated lenses were used in our analysis. The lenses were carefully removed from the sensor and placed into a 3D printed jig. The jig was designed explicitly so that each image was slightly out of focus. This assists in removing high-frequency image components from our analysis. Only three sensors were used in our experiments as three sensors were damaged during the lens removal process. This gave us six lenses and three image sensors. Images were taken of a fixed intensity white LED light source evenly focused through a sheet of white opaque perspex to create an evenly illuminated light box. This suppressed contamination from high-frequency image content being passed through the high-pass filter of our PRNU estimator. Pinholes were manufactured using 3D printing. A 1.5mm diameter aperture was designed at a distance of 3mm to ensure the focal ratio of the lens was kept consistent at f/2.0. This enabled intensity of the light striking the sensor to be keep consistent across the pinhole and standard lenses resulting in a consistent integration time of 1/1008 seconds. Ensuring integration time was consistent meant that no scaling effects occur between pinhole and lens image sets, and keeps dark current constant. The temperature was kept at a constant T=\SI{30}{\celsius} to further ensure the effects of dark current were controlled. Varying either the exposure light intensity of the temperature should result in an increase of dark current, hence, it is important that these variables are kept constant for comparison. Each image was preprocessed before filtering. We separated each colour filter array element into a separate array. Each image was cropped to 1024x1024 image offset by 38 pixels from the top left-hand corner. This enabled us to obtain a broad cross-section of the image and would emphasis any lens effects such as vignetting. The resulting four arrays were turned into zero mean signals before being processed by the wavelet coring filter \cite{farid2016photo}. We used the same wavelet coring filter as proposed in \cite{lukas2006digital} with one minor difference. Instead of using advancing squares in the m x n MAP estimate we used overlapping squares, doubling the number of calculations required. We then rejected the outer edges of the m x n pixel arrays to ensures edge effects are discounted from the final analysis. The m x n arrays are then stitched back to create the final PRNU analysis for each CFA array. This process is shown in Figure \ref{newAlgorithm}. Finally, we merge each PRNU estimation for each CFA array back to a single array for the PRNU estimation of the entire sensor. We then correlate each CFA to its corresponding CFA in the image under test. Our final correlation value is then taken to be the average correlation value across each of the four CFA sub arrays. \begin{figure}[!t] \centering \includegraphics[width=21pc]{EdgeEffectRemovalAlgorithm} \caption[Overlapping Edge Removal Method]{The overlapping method to reduce edge effects from the wavelet coring method. The dark regions in each square (left) indicate the calculated region of the filtered noise residue retained in each pass corresponding to their effecting location in the resulting noise residue (right). The method results in m+1 x n+1 passes being performed as opposed to the original m x n.} \label{newAlgorithm} \end{figure} 150 images were taken using each of the three cameras with each of the six lenses attached in turn. From each set of 150 images, 50 were randomly divided into a reference pattern, while the remaining 100 formed an image set to correlate against the reference patterns. An additional set of images was captured at the same exposure time, temperature and illumination using a pinhole designed to have the same f-number as the original lenses. This gave us seven sets of images per camera and 21 discrete reference patterns. \section{Results and Discussion}\label{sec:resultsanddiscussion} Results of the lens image sets (3600 images) correlated against each of the seven reference patterns are shown in Figure \ref{allcameraswith}. Figure \ref{pinholewith} shows the result of these same reference patterns correlated with the remainder images captured using the pinhole lens on each camera (300 images). Only images known to be from that camera are shown in these figures as uncorrelated results are uniformly distributed about the origin and hence are omitted for clarity. \begin{figure}[!t] \centering \includegraphics[width=21pc]{AllCameras_WithDarkCurrent} \caption[All Cameras with Dark Current]{Box plot of all cameras reference patterns of the lenses correlated against lens image sets not corrected for dark current.} \label{allcameraswith} \end{figure} The results in Figure \ref{allcameraswith} show the lens reference patterns with similar means and ranges. Our results are approximately 0.02 larger than those first reported in \cite{lukas2006digital} which we attribute to the additional steps taken to eliminate edge effects in our denoising filter. Each of the lens sets shows statistically similar results. The range, mean, maximum and minimum values are consistent within an overall range of 0.025 to 0.031 across the six lenses. The pinhole set, however, has a range of almost twice that at 0.040 with the maximum value below the minimum value of any one lens. This suggests statistical invariability across lenses manufactured of the same type, however, reinforces the hypothesis that high-frequency lens artefacts are included in the noise residues used to create both individual fingerprint and reference patterns. The lens sets have a median value of 0.085 and mode of 0.083. There is a difference of less than 0.007 within the means for the lens sets showing that they are consistent. The pinhole set has a mean of only 0.062. This is a clear difference between the average means of the lens sets and the mean of the pinhole set at 0.023, but the pinhole is still capable of statistically matching to the right camera. The pinhole correlation showed a broader range than each of the lens sets with a majority of the data falling within the interquartile range and skewed towards the higher values, whereas each of the lens sets is skewed towards the lower end of the range. \begin{figure}[!t] \centering \includegraphics[width=21pc]{PinholeImageSet_WithDarkCurrent} \caption[Pinhole Image Sets with Dark Current]{Box plot of pinhole image reference patterns correlated against pinhole image sets not corrected for dark current.} \label{pinholewith} \end{figure} An interesting observation is that the uncorrelated pinhole image set is positively skewed whereas the correlated lens image sets are negatively skewed. This observation extends to figures \ref{pinholewith} and \ref{allcameraswithout} with the exception being the pinhole image set matched to a pinhole reference pattern corrected for dark current with dark frame removal in Figure \ref{pinholewithout}. It may be possible to identify or profile a device such as a pinhole by comparing means of statistically significant sample sizes in this manner. Comparing Figure \ref{allcameraswith} to Figure \ref{pinholewith} it is apparent that the means of the lens reference patterns reduce to be in line with the pinhole reference pattern when correlated against pinhole image sets taken from the same camera. This aligns with the hypothesis that the lens reference patterns contain additional signal energy from the high-frequency components of the lens passing through the signal filters in the process of obtaining the noise residues. Using the average correlation from the lens sets in Figure \ref{allcameraswith} (since they are consistent) and Equation \ref{14} above we can calculate the overall correlation energy of the SPN with the effects of the lens included. \begin{align}\label{darkcurrent1} \begin{split} <\mathbf{N^2_{SYS}}{>} {\:} -<\mathbf{n^2_{V}}> & {=} <\mathbf{n^2_{SPN}}> + <\mathbf{n^2_{LOS}}> \\ &= 0.0865 \end{split} \end{align} Using the averages of all results contained in Figure \ref{pinholewith} we are able to calculate the correlation energy of the SPN without effects of the lens present: \begin{align}\label{darkcurrent2} \begin{split} <\mathbf{N^2_{SYS}}{>} {\:} -<\mathbf{n^2_{V}}> - <\mathbf{n^2_{LOS}}> &{=} <\mathbf{n^2_{SPN}}> \\ &= 0.0666 \end{split} \end{align} Substituting this result back into \ref{14} we can obtain a result for the correlation energy of the LOS alone. \begin{align}\label{darkcurrent3} \begin{split} 0.0666 + <\mathbf{n^2_{LOS}}> &= 0.0865 \\ <\mathbf{n^2_{LOS}}>&= 0.0199 \end{split} \end{align} This figure corresponds to the effects of the LOS based on measurements with dark current influence in the sensor. Since many modern-day camera correct for dark current, each of the images was also corrected for dark current through the use of a dark current frame removal. This was to ensure dark current was not contaminating our results. As seen in Figures \ref{allcameraswithout} and \ref{pinholewithout} the range of the correlation scores are reduced however the overall result remains. The correlation is significantly reduced upon removal of the lens. \begin{figure}[!t] \centering \includegraphics[width=21pc]{AllCameras_WithoutDarkCurrent} \caption[All Camers without Dark Current]{Box plot of all camera reference patterns of the lenses correlated against lens image sets corrected for dark current.} \label{allcameraswithout} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=21pc]{PinholeImageSet_WithoutDarkCurrent} \caption[Pinhole Image Sets without Dark Current]{Box plot of pinhole reference patterns correlated against pinhole image sets corrected for dark current.} \label{pinholewithout} \end{figure} The pinhole set with dark current removal shows good uniformity with the mean centred about the range of the set. Since lens effects and dark current have been removed, the correlation should be acting upon only the correlated PRNU within the image. This shows a Gaussian distribution as expected with the mean centred around the mean of the lens results. When our reference pattern is constructed only with pinhole images and is correlated with images taken using a lens we are no longer correlating against the high-frequency lens artefacts seen within the lens reference patterns. This is a clear result from Figures \ref{pinholewith} and \ref{pinholewithout}. We can use this result to further estimate the effects of dark current within the correlation energy by repeating the calculations above and also check the figure we have obtained for the LOS. Using the average correlation from the lens sets in Figure \ref{allcameraswithout} (since they are consistent) and Equation \ref{14} above we can calculate the overall correlation energy of the PRNU only with the effects of the lens included but without dark current. \begin{align}\label{nodarkcurrent1} \begin{split} <\mathbf{N^2_{SYS}}{>} {\:} -<\mathbf{n^2_{V}}>&{=} <\mathbf{n^2_{SPN}}> + <\mathbf{n^2_{LOS}}> \\ &= 0.0844 \end{split} \end{align} Using the averages of all results contained in Figure \ref{pinholewithout} we are able to calculate the correlation energy of the PRNU alone: \begin{align}\label{nodarkcurrent2} \begin{split} <\mathbf{N^2_{SYS}}{>} {\:} -<\mathbf{n^2_{V}}> - <\mathbf{n^2_{LOS}}> &{=} <\mathbf{n^2_{SPN}}> \\ &= 0.0644 \end{split} \end{align} Substituting this result back into \ref{14} we can obtain a result for the correlation energy of the LOS alone. \begin{align}\label{nodarkcurrent3} \begin{split} 0.0644 + <\mathbf{n^2_{LOS}}> &= 0.0844 \\ <\mathbf{n^2_{LOS}}>&= 0.0200 \end{split} \end{align} Figure \ref{pinholewith} corresponds to the effects of the lens only within the sensor and is consistent for our measurements with dark current as calculated in Equation \ref{darkcurrent3}. Comparing the results of Equations \ref{darkcurrent1} and \ref{darkcurrent2} with Equations \ref{nodarkcurrent1} and \ref{nodarkcurrent2} we see that dark current (FPN) corresponds to a contribution of ~0.0022 to a correlation of 0.0865. Given these values represent power correlation amplitudes we are able to convert them into signal to power ratio terms using the following: \begin{align}\label{SNR} \begin{split} SNP_{dB} &= 10 log_{10} \frac{P_{signal}}{P_{total}} \\ \end{split} \end{align} Where the identifier is either PRNU, dark current or combination of them both. These values are summarised in Figure \ref{SNRValues}. It is possible to treat each of PRNU, dark current and the LOS as unique identifiers hence, the signal. Conversely, we can think of the high frequency image content within our residues as the noise. Switching our definition of the signal and noise in such a manner enables us to calculate SNP values for each identifier in a forensic context. These values are summarised in Figure \ref{SNRValues}. We see that the uncorrelated high-frequency components of the reference patterns dominate with a signal to power value of 91.4\% of the total signal power. PRNU has the strongest of the individual identifiers with a signal to power value of 6.44\% however, the highest identifier value corresponds to the combination of PRNU, dark current and LOS with a value of 8.7\% of the total power of the signal. This is clearly contrary to assumptions made in \cite{lukas2006digital} that the method is matching only to the PNU as a subsection of PRNU since the best match is made with a combination of all the identifiers measured. We can also see that PRNU accounts for nearly 75\% of the extended fingerprint's power. This is compared to the LOS at 23\% and Dark Current at only 2.5\%. This observation provides an explanation as to why the work of \cite{lukas2006digital} was successful although all sources of correlated power were unaccounted for in their method. \begin{figure*}[!t] \centering \includegraphics[width=\textwidth]{SNPValues} \caption{Signal power expressed as a ratio of total power levels of each identifier contained within our extended fingerprint.} \label{SNRValues} \end{figure*} Dark current was measured to be an appreciative 0.2\% of the total range of the image when held constant at T=\SI{30}{\celsius}. This is expected to increase with temperature as seen by the theoretical models in \cite{holst2007cmos} and will be explored in future work. It is also noted that should the intensity of light decrease the amount of power that the dark current has compared to other sources of power in the image would inversely increase. This has not been experimentally shown due to limitations of the lighting apparatus used when conducting this initial study but, we note the theory illustrated in \cite{holst2007cmos}. By removing the lens, we were able to eliminate the source of stochastic variance and isolate the deterministic component of the lens optical system and measure the contribution of the LOS to be 2.0\%. We note that some variance due to lens aberrations will still be present due to the involvement of the micro-lens array on the sensor itself. Some sensors use a dual micro-lens design. These aberrations from the micro-lens are unique to each sensor and hence form a significant source of the PRNU. Likewise, some aspects of the camera noise \cite{holst2007cmos} is unique to each camera but were excluded from our noise residue model since we were only concerned with the image sensor. In reality, since these camera noises are unique their effects may be seen within a sensor fingerprint but have not been attributed above. While cameras of a similar make and model have been evaluated here to eliminate possible sources of experimental error it is worth noting that we expect that other cameras should exhibit similar breakdowns with the amount of power scaling in proportion with the quality of the sensor. Scientific grade sensors with low dark noise by design should show very little dark current contamination whereas we expect low grade CMOS cameras for integrated mobile applications designed without built in dark current correction to have some of the worse. This expectation is consistent with the results shown here. The Sony IMX219 sensor used in this work has built in dark current correction at the silicon level \cite{sonyIMX219} , however, still shows evidence of a contribution, albeit small, of signal power attributed to this forensic trace. \section{Conclusion}\label{sec:conclusion} While we do not dispute that the method first proposed by Luk\'{a}\v{s} \emph{et al} is capable at blindly identifying images uniquely to their source camera, our work has shown that there is more to understand behind this methodology then first described. The additional factors are acting upon the correlation seen need to be understood before it can be used as a reliable methodology to solve the blind source camera identification problem for legal purposes. We have shown that dark current and the LOS contribute a non-insignificant amount of energy to the correlation. While an amount of energy in the correlation is contributed by the lens aberrations, the method shown here is not statistically capable of uniquely identifying a particular lens of similar design. An area of counter forensic method however is left as a proposal to disrupt the SPN fingerprint methods by designing a lens with extreme high-frequency aberrations to corrupt the SPN. This reinforces the initial findings of Knight \textit{et al}. Our method demonstrates an additional protocol step of lens isolation using a pinhole camera should the suspect camera be available to the investigator. Our paper demonstrates that this critical step of image verification should be taken to increase the certainty of a positive match particularly in the context of charges relating relating to the production of photographs using professional grade dSLR cameras where multiple lenses are interchangeable. Such a step can increase the certainty of a positive match and aim to verify the results of the forensic investigation. Forensic investigators must be aware of the result of this step demonstrating the significance that the lens system may play particularly when using SPN to solve the open set blind source camera identification problem. \section{Acknowledgements} This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. This work was supported with supercomputing resources provided by the Phoenix HPC service at the University of Adelaide. This research is supported by an Australian Government Research Training Program (RTP) Scholarship and forms part of a thesis chapter. \bibliographystyle{elsarticle-num}
{ "redpajama_set_name": "RedPajamaArXiv" }
1,864
Bizarre, Free Speech, Media, Politics, Religion, Society September 14, 2018 September 14, 2018 The Spanish Inquisition: Actor Becomes Latest Blasphemy Target In The West I have previously written about the continued use of blasphemy laws in the West, including Spain and Ireland. The continued enforcement of medieval concepts of blasphemy as evidenced by the detention of Willy Toledo, who was accused of ridiculing God and the Virgin Mary in court. Toledo is being targeted due to comments made on social media in support of three women who are being prosecuted for blasphemy. It is chilling to think that an actual judge would hold such a hearing in modern times. The nation that gave us the Spanish Inquisition still claims the right to imprison people for insulting God. We have previously discussed the alarming rollback on free speech rights in the West, particularly in France (here and here and here and here and here and here) and England (here and here and here and here and here and here and here and here and here and here). Much of this trend is tied to the expansion of hate speech and non-discrimination laws as well as blasphemy laws. A Spanish actor accused of ridiculing God and the Virgin Mary has been detained for questioning by a judge, police have said, in the latest high-profile case to raise freedom of speech fears in the country. Toledo posted a July 2017 Facebook message in defense of three women who paraded in the southern city of Sevilla with a giant vagina. The protest simulating a religious procession was dubbed the "Coño Insumiso" or "Insubordinate Pussy". Toledo responded in a clearly intentional insulting and vulgar way: "I shit on God, and I have enough shit left over to shit on the dogma of the sanctity and virginity of the Virgin Mary. This country is unbearably shameful. I'm disgusted." I find Toledo's posting obviously crude and offensive, but that does not lessen the protections that should exist for such exercises of free speech. We do not need free speech for popular speech. Moreover, religion is the most common area for state repression of free speech. It is equally disturbing to see the involvement of lawyers in leading the mob to target unpopular speakers. The Spanish Association of Christian Lawyers denounced Toledo for "covering God and the Virgin Mary with ridicule" and is seen as supporting the prosecution. Toledo has thus far ignored the summons. Trump Versus George Washington: GW Stands By Mortality Findings From Puerto Rico Deli Worker Charged With Felony For Eating Slices Of Lunch Meat 77 thoughts on "The Spanish Inquisition: Actor Becomes Latest Blasphemy Target In The West" Al O'Heem says: Totally unexpected. https://vignette.wikia.nocookie.net/montypython/images/f/ff/Spanish_Inquisition.jpg/revision/latest?cb=20180629171423 Bernard says: The God I worship teaches that the one true way to reach heaven is to follow his teachings on insulting all religions. Failure to 'blaspheme' is blasphemy. By committing blasphemy I am only following the edicts of my religion. Preventing me from doing so is a violation of my religious freedom whichwitchhunt says: Mueller's Art Of The Deal: Spend $28 million investigating Recoup $46 million from Manafort Spiked says: fwiw – excellent film "Goya's Ghosts" about the horrors of the Spanish Inquistion slohrss29 says: Yes, that is a pretty amazing film. Of course, Bardem is always awesome, and I think Padme (Portman) was super as well. Tragic… but it was Goya, after all… if you picked the top 10 films about the Spanish Civil War, every one would be pro-Republican and anti-Franco. And not one would reveal the truth of the 50,000 priests nuns and other Catholic clergy murdered by the Republicans. If one can't tolerate anything which even faintly praises the rebels, then at least read George Orwell's diary of his service in the Catalonian militia, which he says was basically betrayed by the Stalinists. Too bad for Trotsky. Then there is another film lionizing Spanish speaking Trotskyites out there, Frida, not worth watching except for hearing Chavella Varga sing "la Llorrona" oh and the part where Stalin's assasin shivs ole bespectacled Lev. That was a good scene too. With all that's going on now, all JT can think to write about is some blasphemy prosecution in Spain? What's the matter? Can't he think of some way to positively spin Trump's dispute with the death toll in Puerto Rico, a dispute based solely on the fact that the true numbers make Trump look bad? Why not write about the lack of a Republican backlash to this baseless dispute and lack of sympathy it shows? According to Trump, if you don't get killed by being struck by a storm surge or swept up into the wind and throttled, your death wasn't caused by the hurricane, even if you drowned, had a car wreck, a heart attack or other medical emergency, but couldn't get to a hospital, or if you died of exposure or other causes that resulted from the hurricane. And then, there's the allegation that Kavanaugh tried or did sexually assault a woman, with others, while a student at a tony Catholic prep high school in Maryland. Also, there's the consistently low polling numbers, plus allegations that Kavanaugh has lied under oath. There are lot's more important and relevant stories than a blasphemy prosecution in Spain. i can agree on that last proposition, mostly, but probably if Kavanaugh pinched a fanny in high school that is not one of the more consequential stories. it's pretty funny that a high school student's alleged bad conduct is now grounds for an FBI investigation decades hence. shows how insane the METOOers have become. Like BLM, it started out as people with a legit gripe, and has morphed into a monstrosity. Teaching Spastics to Dance says: Like BLM, it started out as people with a legit gripe, There was no legitimate gripe. It was sorosphere rent-a-crowd operating under the assumption that blacks are some sort of aristocratic class who can properly attack white civilians and police officers with impunity. I am trying to be charitable about that Spas. My actual opinion is rather like what you said. I was hoping you wouldn't force me to say so. The analogy is still apt; some incidents were exaggerated into a "movement" that legitimatized whatever basic complaint was at the foot of it. Thanks for chiming in, I was woeful I would miss one of your responses before the weekend. even physicists agree with the miracle of Creation. Let me explain: they can't explain what caused the Big Bang– it just happened. That reminds me. There is a new speculation among computer geeks and so forth: we live in a simulation concocted by Aliens. Musk just mentioned this, google nick bostrom if you want the works. It seems to me that this is a lot like the Creation story: strikeout God and insert "advanced alien civilization" created the universe…. It kind of seems like since physics could not explain the big bang, computer geeks have innovated their own geeky version of "the Creation myth" and made it their own. So, life is complicated, that is for sure. Some think it was God that hit the button causing the Big Bang, if they're was one: http://counterthink.com/CounterThink-Episode-6-Glenn-Jessome.html We're just physical awareness as a result of some clever coding. The Germans did some experiments a while back and feel there was enough disturbance "flicker" to conclude it may be a possibility. After I take the time to eat in the company of other humans this evening, I'll try to look that up. Or I might just have a beer instead. Bundesliga was already on today. why is it so hard to believe that the universe just happened when we are asked to accept that God just happened.? Paul C Schulte says: Anonymous – if we are to believe, God always was. Foxtrot Foxtrot Sierra says: Reminds me of a funny story from a while back: Some scientists claimed that they had figured out how to create life. So God said, "Okay, show me". So they bent down and picked up some dirt, and God said, "Oh no. Make your own dirt." FFS – ROTFLMAO. Jim22 says: Trump, a while ago: "They call them flippers." Yes, they do. ozpaez says: The poor Spanish can't catch a break. While it's true that the Inquisition was nasty, so was the burning of witches and others across Europe and even early America. Such religious fervor did little beyond impoverishing countries with closed minds. In terms of this case, while Blasphemy Laws are out of step with modern sensibilities, at least they land the accused before a judge. Of late in the US, trying to express unpopular speech, expressing support for historical public works of art, or even wearing a MAGA hat can land people in front of a violent mob. We should not get on our high horses and look down our politically correct noses at the Spanish until we resolve growing violent opposition to non-PC speech in our own country! "We should not get on our high horses and look down our politically correct noses at the Spanish until we resolve growing violent opposition to non-PC speech in our own country!" Nothing wrong with pointing out historical events. It's good, that's how we learn (except for those folks who already know the underpinnings of the universe. People really aren't that smart (see Nutacha), and need many illustrations to learn something. They bless us with their short-sightedness regularly.) Another example illustrates why we need to "resolve growing violent opposition to non-PC speech in our own country." Maybe if the enlightened teacher who hit people with a bike lock might have a moment of reevaluation after he hears about examples of suppressing thought (hopeful, but I doubt it). read about the "Red Terror" of the 1930s in Spain where crazed leftists terrorists murdered as many as 50,000 priests, nuns, and other religious. We hear about the Inquisition from 500 years ago but nothing about that. That was about 90 years ago. Funny how 'history books" chose their content. "read about the "Red Terror" of the 1930s in Spain" That's a good point. Not much on that, it's usually treated about the level of a "false alarm; everything is OK, nothing to see here, turn the page…" For those denying the existence of natural rights, if Spain or France or the United States established blasphemy laws, what would be the basis to argue they were unjust? Nicely said Olly. The visceral leftists will have to learn it all over again. They are already becoming victims to their own newly defined standards… "first they came for… then they came for…" You know the rest… Joseph Jones says: Canada and 17 EU nations have blasphemy laws: in these nations persons who contradict the Western narrative of "holocaustianity" are imprisoned. Articles like this one today are welcome, but I truly wish Turley would attack the subject of "blasphemy against holocaustianity" (holocaustianity thought crime) with the same fervor and gusto. Also how about tackling the "Israeli" "crime" of males being wrongly born to Palestinian parent: "Israeli" law prohibits such person from attaining Israeli citizenship. How about the proposed Israeli law wherein every citizen must sign a document and declare public allegiance to Israel as a "Jewish" (religious) State? Persons who declined would lose citizenship. If that's OK, then certainly it's OK to imprison this Spanish "blasphemer" in Spain, which once upon a time banned all Judaics. Always start by understanding what the law is in a jurisdiction, before you get to wehther it is just or not. Olly makes a question that relates to justice and specifically mentions natural rights. Well long before the Enlightenment had its secular version of natural rights, .Catholicism had a philosophy of natural rights, rooted in Aquinas, who drew on Aristotle. .And if I understand it correctly, it considered that blasphemy was properly unlawful. And these are Catholic states. And cultures, even though they are secular states. They are democratic in similar ways to the US, but they are their own sovereign realms. They have what laws they have. Personally, I dislike insults to religion. I thought it was good to arrest Pussy riot for parading naked in churches in Russia. They are not my heroes just obnoxious people. I would consider that action both legal and just. Here it is a little different because the law iinvoked is not tresspass. So perhaps it is a little bit more into the questionable range. On an emotional level, personally, I have no problem with it. He will get a slap on the wrist. Save your ire for countries like Saudi where they would execute him for blasphemy. There is zero chance Spain will produce a new Franco any time soon. And keep in mind the particular religious history of Spain in the 20 century: the Civil war say occasions of Republican partisans confiscating Church lands, and raping and killing Catholic religious. So their experiences with "blasphemy" are rather different than ours. On balance I worry very little about the accused. What he said is disgusting, to me. Very offensive. Of course he could say it here in the US but if he says it in Spain he will get some trivial punishment. Spain is Spain, America is America. It's not my business to Criticize Spain. In many EU countries if you raise your right hand and say "Hail" you can go to prison for a a long time. Germany and a few others. And there are many people who have spent terms in prison for that. I find "hail" a less offensive remark than what this creep said. But it's not my business to criticize Germany either. I'm American. Probably the Spanish left, will make a cause celebre out of this potty mouth fool. He will be fine, don't lose too much energy worrying about him. Well long before the Enlightenment had its secular version of natural rights, .Catholicism had a philosophy of natural rights, rooted in Aquinas, who drew on Aristotle. Long before Catholicism had its version of natural rights, long before Aquinas and long before Aristotle, long before the creation of any religion, man the cave dweller had his own version of natural rights. The natural right to try everything to survive. So what has changed over the thousands of years of man's existence? Human nature; no. Natural rights; no. Barriers to the security of natural rights; yes. Since the Enlightenment, and specifically since the DoI, more and more countries have evolved towards more security of those rights. Some countries are slower to accept it and some have actually gone in the other direction. "atheism" is not a thing. It makes no sense to describe someone by what they are not. When describing people by whether or not they are religious, the correct descriptions are: normal people and religionists. It makes no sense to describe someone by what they are not. Why don't you take your complaint to whoever is is that supervises the dregs of Madelyn Murray O'Hair's outfit? Sam – normies are religionists, so what does that make you? Justice Holmes says: When religion uses the mechanism of the state to enforce its beliefs and shut down criticism, it threatens all of us whether we live in that country or we don't. Blasphemy laws are offensive and viewing them as a normal activities for government in the 21st century is mind boggling. It doesnt matter what religion is privileged by a state in this way, the US should speak up. Unfortunately, there are some in the US who seek this kind of privilege and have already been successful in a number of areas although we are currently spared the burden of blasphemy prosecutions. Unless a person opposes apartheid and ethnic-cleansing. That is apparently "anti-Semitic". No, libeling Jews is anti-semitic, and that's what you're doing. I suppose our local Judaic Police Authority above would label anti-Zionist Rabbis like in this video as "Self hating Jews:" https://www.youtube.com/watch?v=FKplabTRuak James Sobran authored the best definition for anti-Semite: "Not someone who hates Jews, but rather someone hated by certain Jews." By definition, if anti-Semitism exists, then the opposite must also, "anti-goyim." It's interesting that all or most persons who promote the term "anti-Semite" deny that the existence of "anti-goyim." The holiest of all Judaic holy books is The Talmud. I wonder how our local Judaic Police Authority above would classify this verse from The Talmud: "Even the best of the goyim deserve only death?" Is there any scent of anti-goyim hidden in there, I wonder? His name was Joseph Sobran and he began to decay intellectually in 1986 and by 2002 was issuing public encomiums to the director of the "Institute for Historical Review" a holocaust denial outfit. He wasn't 'hated' by anyone. He blew up his own career by trading in crank-nonsense other people did not wish to broadcast and publish and with which they did not wish to be associated. The Jew he fancied hated him was Norman Podhoretz, who made the case to Wm. F. Buckley that Sobran did not merit a position on the masthead of National Review. Sobran's reply was a newspaper column in 1993 in which he all but dared Buckley to fire him. After he was dismissed, he learned the hard way that his association with Buckley was why his writings were salable to commercial publishers and broadcasters. I like a lot of what Sobran wrote, but I think Spastic has the employment picture correct. If you defy the boss you will get fired, that's how jobs work. I recall one of my acquaintances saw Sobran not long before he died and he just said one word about how he looked: "weird." He was suffering from something, who knows what. They say that the Jewish people suffer a higher level of heritable mental illness than some other ethnic groups. Maybe that is true. Of course mental illness and genius often run in the same families. I also suspect that people who make a hobby out of criticizing Jews often have a higher level of mental illness than the gen pop too. Some people recoil at what is deemed antisemitic, and others run towards it like mosquitoes to the firelight. remember the old adage, "in all things moderation" He was a resident of the Fairfax Nursing Center from 2008 to 2010, if I understand correctly, no longer ambulatory due to diabetic neuropathy. I'll wager he didn't look well. After he died, his friends offered remembrances of him that included details which indicated he hadn't handled daily life well in quite some time. A birdseye review of his life suggests he'd never been a practical man and that Buckley was to some extent sheltering him during his 21 years on the staff of NR. Sorry for the first name error. Still awaiting to see the Land Title with _od's signature granting Palestine to the Jews 2k years ago. I can only presume, that by ignoring the Judaic Talmudic verse I quoted, that you have no reply. Do you approve of the verse? Is it anti-goyim? Why can't you answer these simple questions? I can only presume, that by ignoring the Judaic Talmudic verse I quoted, that you have no reply. I didn't reply, because I don't care. No one who isn't a kook has an issue with Jews in New York or Jews in Jerusalem because of obscure passages in the Talmud. That aside, I wouldn't begin with the assumption that you quoted it correctly, that you quoted it in context, or that you consulted any commentaries on the passage in question, or that you apply any sense to the interpretation of scripture other than the one that gets you what you want. Still awaiting to see the Land Title with _od's signature granting Palestine to the Jews 2k years ago. You want a divine land title? Who else has one? the question was not addressed to me. but here is what i have read about it. supposedly it means "kill even the best gentiles during wartime" I can understand that and cut the rabbis some slack. that's what happens during war. it's ugly. The Hebrews were good at war or else they would not have survived the centuries… Same thing true of any other people still alive and kicking. http://www.viciousbabushka.com/2009/06/tob-shebbe-goyim-harog-what-it-really-means.html WASHINGTON – An elderly gunman opened fire…… James Von Brunn, a white supremacist, was under investigation in the shooting…… Von Brunn has a racist, anti-Semitic Web site and wrote a book titled "Kill the Best Gentile." — AP News Talmud Sofrim 15:10 תני רבי שמעון בן יוחי הכשר שבגוים בשעת מלחמה הרוג R. Shimon ben Yochai taught: Kill [even] the good among the gentiles in wartime. While this passage seems to advocate the genocide of all non-Jews, it must be remembered that this is a single passage extracted from a thorough study. Without seeing it in its original context, a simple reading is both incorrect and unsound scholarship. Let us look at the full original passage as recorded in a number of places. The original teaching is part of a study of the book of Exodus. At this point, the Jews have left Egypt but have not yet crossed the Sea of Reeds. The Egyptian people, after suffering through ten long and difficult plagues, have decided to pursue the Jewish people rather than let them go. Mechilta, Beshalach 2 (on Exodus 14:7) [Exodus 14:5-7 "It was told to the king of Egypt that the people had fled; and the heart of Pharoah and his servants became transformed regarding the people, and they said, 'What is this that we have done that we have sent away Israel from serving us?' He harnessed his chariot and attracted his people with him.] He took six hundred elite chariots [and all the chariots of Egypt, with officers on them all."] From whom were the animals that drove the chariots? If you say they were from Egypt, doesn't it say (Exodus 9:6) "and all the livestock of Egypt died [from the fifth plague]"? If you say they were from Pharoah, doesn't it say (Exodus 9:3) "[Moses said to Pharoah]: Behold, the hand of G-d is on your livestock that are in the field"? If you say they were from the Jews, doesn't it say (Exodus 10:26) "And our livestock, as well, will go with us- not a hoof will be left"? Rather from whom were they, from the Egyptians who feared G-d [and were not affected by the plagues]. We now see that the livestock of the G-d-fearers that escaped the plague caused great hardship for the Jews [by being used for chariots to pursue them]. From here R. Shimon [ben Yochai] said: Kill [even] the good among the gentiles. From the above teaching we see that R. Shimon ben Yochai was discussing a case of war. The G-d-fearers among the Egyptians allowed their animals to be used in battle against the Jews. Presumably, these people went along with their animals and drove the chariots. We now see that the G-d-fearers, the "good" among the gentiles, were doing battle with the Jews. To this R. Shimon ben Yochai said that, when in battle, do not try to spare the lives of those opposing soldiers who are fine, upstanding people. Kill any enemy soldier, regardless of their character. This contextual approach to understanding R. Shimon ben Yochai's statement is how the post-Talmudic literature has read this statement [see Tosafot, Avodah Zarah 26b sv Velo; Maimonides, Mishneh Torah, Hilchot Avodah Zarah 10:1]. Reading R. Shimon ben Yochai's teaching as a single-sentence imperative to kill all gentiles is simply wrong and is not how Jewish scholars have ever understood it. these days, mostly just Naturei Karta and some other extreme orthodox Jews harbor anti Zionist opinions; but, interestingly, a lot of religious jews were very much against Zionism in its infancy. It was considered a "forcing of Gods Hand" or something like that. even today haredim are exempt from military service in Israel. Israel was essentially a secular state in its founding and not a religious one. this article describes how the haredi have come to increasingly support the state of Israel over time, but some hold out against it https://www.haaretz.com/israel-news/.premium.MAGAZINE-the-last-jewish-community-holding-out-against-zionism-1.5443981 I like Alan Dershovitz on this point. he is an atheist but he frankly recognized how the Jewish religion has aided the Jewish people in sticking together, having families, and so forth, in his excellent book "The Vanishing Jew." Of course a lot of Jews hate him too, and that book. You know the old proverb: "two jews, three opinions" here is a good column by a rabbi about that. https://www.ou.org/torah/parsha/rabbi-weinreb-on-parsha/rabbi-weinrebs-parsha-column-korach-two-jews-three-opinions/ I have been called antisemitic just for studying Jewish topics and talking about them. Other people called me philosemitic just for studying them. You can't please everyone. I don't worry about it. You make your points and they are valid and well reasoned, or not. Don't worry about all the name calling. If you call out the Zionist agenda they hide behind the "anti semetic" shield. Not all Jews are Zionists which is a political movement rather than a religion, There are also plenty of goys who identify as Zionists. The world is waking up though. Abby Martin is a beautiful young woman with a sharp mind. And she had an interesting show on RT, but she's not done very well since. Another example of how you can get too exercised about certain things, and it's bad for you. Abby outgrew RT – it was a good run for her but ultimately too confining. She has a show called "Empire Files" which until recently was hosted on Telesur. Right now she's on various indie shows – most recently on Jimmy Dore. Venezuela doesnt deserve her. Then again neither does it deserve Maduro, but in a different way. If you call out the Zionist agenda they hide behind the "anti semetic" shield No, you get called an 'anti-semite' because you're fixated on a country with a population and productive base smaller than Belgium's and babbling on as if there was something nefarious about the ordinary particularism and the ordinary activities in the realm of self-defense of the inhabitants of that small country. . The inhabitants of Palestine are Palestinians. The illegal European terrorist immigrants are not inhabitants but squatters. Palestine, Palestinians are made up fake constructs. With current DNA tech of the bones from the graves tell us who was there before. Anyway, here is the agreement made between the Arabs & the Jews & I seem to recall the Arabs got something like 98% of all the lands. BTW: I don't trust wiki: https://en.wikipedia.org/wiki/Balfour_Declaration Also, I didn't know at one at one point there were many more whites in the middle the DNA is reported as showing. The inhabitants of Palestine are Palestinians. 1. There is no such place as 'Palestine', nor were there any such people as 'the Palestinians'. The British government assembled 3 Ottoman sanjaks and referred to the whole as the Mandate of Palestine. The territory assembled was bound together as such from 1920 to 1948; the term was not used before or after. You had a set of local Arabs there present and you had an Arab immigrant population which entered between 1920 and 1946. There wasn't anything which distinguished these Arab populations from adjacent Arab populations (most of whom favored Levantine dialects and some of whom favored Eastern Bedawi dialects). Some regarded themselves as Syrians, some as Arabs, and some identified with their lineages or locality. The illegal European terrorist immigrants are not inhabitants but squatters. There are no such people outside your imagination. There are Ashkenizic Jews in Israel. There are also Sephardic and Mizrahi Jews in Israel. They built the country. What the Arabs in Gaza, on the West Bank, and in the UNRWA shanty towns elsewhere in the Levant refuse to do is build anything. As in your other posts, you conjoin arrogant self-confidence with gross ignorance. How does it feel? self defense? the Lebensraum settlement expansion? Killing medics/journalists and protesters "armed" with rocks and flaming kites? Preventing medical supplies from reaching Palestinians? Last I checked no other country has such an influence on our foreign policy or as much financial support. the Lebensraum You're in a hole. Quit digging. settlement expansion? Jewish settlers are confined to Zone C of the West Bank, which contains about 10% of the Arab population. 'Expansion' means someone adds a prefabricated cottage to an already existing settlement. 77% of the settler population lives in settlements founded prior to 1987; 17% live in Modin Illit, which is smack on the Green Line nowhere near any Arabs. Another 6% live in settlements founded more recently. That's a grand total of 25,000 people you're whinging about. The population of settlements founded in the last 20 years is less than 5,000. You want the settlements dismantled, tell the brigands you fancy to develop a plan and make an offer (or is that to practical and constructive for Arab partisans?). Killing medics/journalists and protesters "armed" with rocks and flaming kites? Preventing medical supplies from reaching Palestinians? You're violent with the police, somebody's going to get hurt. You don't want trouble, don't make trouble. Last I checked no other country has such an influence on our foreign policy or as much financial support. Well, check again. Iraq and Afghanistan get more aid. Israel receives no economic aid. It receives $3 bn in credits to purchase military equipment from American manufacturers. While we're at it, the number of American soldiers billeted in Israel is numbered in two digits. There are 39,000 American troops billeted in Japan. Billets mean expenditure in that venue. Of course, you haven't a clue how to measure or discern 'influence' over our policy. People whinging about da Joos have their assumptions about how the world works, all of them inane. "Unfortunately, there are some in the US who seek this kind of privilege and have already been successful in a number of areas although we are currently spared the burden of blasphemy prosecutions." I believe you are referring the Democratic party as of late. They seem to have replaced religious ideals with their own self-serving solution. Pick your poison and be consistent. If you don't believe in worship, don't worship the state. Prove your point with rational analysis with the tools you have on hand. Saying you poop on God and the Virgin is incredibly offensive. Putting aside the legalities and justice of crime and punishment, this potty mouth blasphemer may find himself in trouble from extra judicial punishment meted out by private vigilantes. Maybe. Spain is weak compared to what it used to be but there are still people there who have starch in their sails. Observe that he said it on Facebook. Not in public. In some public places in Spain, had he the courage to state his blasphemy aloud in the presence of others, the punishment would have been quick and fierce and he would have been praying to the God he presumed to defecate on, to send police to save him. I do not see you covering the shutting down of conservative commentators in the United States by Twitter, Google, YouTube, etc. Clean your own house first Jonathon. BTW, their country, their rules. And who better than the country that brought us the Inquisition? That makes them highly qualified in this area. Andrea Olmanson says: Google, YouTube, Twitter, etc. are not government actors; they are private companies. Are they now? Can you conclusively offer evidence that they HAVEN'T acted on behalf of government? Seems to me there is plenty of evidence to prove otherwise. Andrea Olmanson – what is their exact role as a private company/monopoly. If they are like a newspaper, they can be sued for libel for the actions of their contributors. If they are totally neutral, then they are just a conduit of information. Which are they going to be. Right now, I think the latest EO was a shot across the bow of the tech companies. I have noticed that the only posts on this site containing the character string "Baronelle Stutzman" were written by guest commenters. In truth, the injuries to a democratic culture of free deliberation find their source in academe, in the legal profession, in corporate HR, and in the media itself. Episodically, they do impose state penalties on people. Mostly, they just prevent them from communicating with the only cost-effective tools available. Americans have heard endlessly about the Inquisition but little about the Red Terror of the 1930s. Read this modest account from wiki https://en.wikipedia.org/wiki/Red_Terror_(Spain) ?The Red Terror in Spain (Spanish: Terror Rojo)[3] is the name given by some historians to various acts of violence committed from 1936 until the end of the Spanish Civil War "by sections of nearly all the leftist groups".[4][5] News of the rightist military coup in 1936 unleashed a social revolutionary response, and no republican region escaped revolutionary and anticlerical violence, but it was minimal in the Basque Country.[6] The violence consisted of the killing of tens of thousands of people (including 6,832[7] members of the Catholic clergy, the vast majority in the summer of 1936 in the wake of the military coup) as well as attacks on landowners, industrialists, and politicians as well as the desecration and burning of monasteries and churches.[7] A process of political polarisation had characterised the Spanish Second Republic, and party divisions became increasingly embittered and questions of religious identity came to assume a major political significance. Electorally, the Church had identified itself with the right, which had set itself against social reform.[8] The failed pronunciamiento of 1936 set loose a violent onslaught on those that revolutionaries in the Republican zone identified as enemies; "where the rebellion failed, for several months afterwards merely to be identified as a priest, a religious or simply a militant Christian or member of some apostolic or pious organization, was enough for a person to be executed without trial".[9] In recent years, the Catholic Church has beatified hundreds of the victims, 498 of them on 28 October 2007 in a spectacular ceremony, the largest single number of beatifications in its history.[10] Some estimates of the Red Terror range from 38,000[11] to ~172,344 lives.[12] Paul Preston, speaking in 2012 at the time of the publication of his book The Spanish Holocaust, put the figure at a little under 50,000……" IN LIGHT OF THAT TERROR FROM THE LEFT NOT EVEN A HUNDRED YEARS AGO, WHICH LEAD TO THE MURDER OF TENS OF THOUSANDS OF PRIESTS BROTHERS AND NUNS, IT SEEMS LIKE MAYBE THEIR LAWS ON BLASPHEMY ARE VERY MODEST! Oh, but you never hear about the crimes of the left in America much, just the nazis, nazis, nazis, nazis, nazis, nazis………… you don't hear about the Red Terror in Spain, nor collectivization and the murder of and starvation of a million peasants in Ukraine….nor the Red Terror during the Russian civil war…. but yes the Germans heard about all that and they were scared of the Reds and for good reason, which may have lead into their excesses….. history gives context and without context, what did Santayana say? "Those who cannot remember the past are condemned to repeat it" But of course, Santayana was a Spaniard. issacbasonkavich says: Religion doesn't work as a power structure if it can be diminished; thus the issue of blasphemy. When a Dutch cartoonist did a drawing of Mohamed with a bomb in his turban, western heads rolled in Afghanistan in retribution. At least in Spain, the courts deal with it. In the West, religion is slowly being put in its proper place, private, personal, and unconnected to governance. It's a slow process, evolution. Not sure about Spain, but according to Pew Research, US affinity for religion (55%) is similar to the populations of poorer, developing nations – including South Africa (52%), Bangladesh (57%) and Bolivia (56%) – than people in richer countries (avg 22%)" Religion is useful to those unable to understand the notions of chemistry, physics, and human sciences. "Religion is useful to those unable to understand the notions of chemistry, physics, and human sciences." You do have a point, despite your condescending presentation. Christ himself noted that the duties of religion help those not able to contend with the larger questions. I caution against blind adherence to science as well, as science is always INCOMPLETE. Partial truths can be just as dangerous as lies. Most good scientists realize this. Information provided by science can be presented in such a way as to manipulate to an end, like religion. Take the Harvard conspiracy over the negatives of fat compared to sugar in diet. That was presented as science, and has since shown to be an outright lie. I might add that there are a lot of positives in carrying on faithfully the moral and ethical guidelines set up over millennia by the western traditions. They have been proven to provide enduring value (far from perfect) that can build a civilization. Better that than worshiping transient and hollow human desires that is the hallmark of today. Religion at least asks you to be a better person, in general. "Religion at least asks you to be a better person, in general." Science, as you know, doesn't care. Yes, and that does explain a lot… slohrss29: Religion has a lot to answer for and a lot to explain. That said, science offers great achievements but eerily confers that lingering notion that maybe … just maybe … we're simply fooling ourselves by trying to understand the world without first understanding ourselves. Moral and ethical guidelines and being a better person are typical of Freethinkers. Religionists tend more towards attacking anyone who is different from themselves. Moral and ethical guidelines and being a better person are typical of Freethinkers. In your imagination only. The one thing that is typical of vociferous atheists (as opposed to the religiously indifferent) is aggression and self-aggrandizing conduct in conversation. See PZ Myers. Typical. But I'll do this once. It appears the left-leaning posters here (save a few) already know all there is to know, including a coming response to a statement. As a sidenote, I would add that maybe changing your handle will get your empathy for your generally poor arguments. How about "Visceral Kneejerks?" Back to the response. Evidently, you didn't read my response to your post, or you would have put forth a relative response. Typical of your lot. But we can do this. "Religionists" are humans, and humans don't do anything very well. I present the Rolling Stones. I wouldn't lump all musicians together by holding them as the general example. Christ was very specific when he instructed that people were not to cast judgement. People fail to some degree in most endeavors. Are you 100% honest on your tax forms? slohrss29 – speaking of tax forms what are we doing about Fan Bingbing? She has not been seen since May 15 and is having tax difficulties. Seems they have a system in China of having two contracts, one for tax purposes, one for realzees. Both contracts for a movie she starred in were exposed on Chinese television. Uh oh. https://www.nytimes.com/2018/09/13/world/asia/china-fan-bingbing.html Yikes! Not familiar with her, but that seems pretty darned scary. A good example for the visceral kneejerkers here to be careful what they wish for. "religionist," another pet pejorative of the Randian Objectivist. The greatest minds have lately been those based in the sciences but with a spiritual understanding. Where the problem starts is when the spiritual awareness gets enlisted by an organized, power based, parasitical religion. Any religion has to address the common goodness and evils, however every religion negates itself spiritually when it professes to be the 'Only Way', or the 'Truer Way'. At this time it is an organization with need for power and adherents. Isaac they are like football fans in a way. If one didn't think it was the best team for some reason, why bother? So in that light you can stop worrying about "organized religion." Without organization most things would soon fail. a good example of this is disorganized old fashioned Chinese Taoism, versus the cultlike new age taoist dabblers of Falun Gong. Authenticity, or doctrinal coherence, Falun Gong has not much; but organization, plenty. Which is why the Chinese state ignores "traditional" Taoist whatever, and instead focuses its repression on the "organized religion" instead. you can't blame the traditional taoist adherents too much for their eclipse, since a lot them were wiped out by Mao's war on the "Four Olds" Mao, one of the most vicious critics of "organized religion," if you don't like it then you could make him your icon, perhaps. Get a little red book and a funny cap. That might seem a little dated, today however. Vociferous atheism is useful for the world's terminally self-aggrandizing people
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
7,957
Ogilvy's Social Media team in Tokyo pulled together a list of some of Japan's top websites. 3. 3 A Sample of 50 Top Japanese Web Sites Yahoo! Japan goo http://www.yahoo.co.jp/ http://www.goo.ne.jp Japan's representative portal site. As a search engine has almost twice the market share of its No. 2 competitor, Google. A large portal site operated affiliated with NTT. Strong on new technology development. MSN Japan @Nifty http://jp.msn.com/ http://www.nifty.com/ One facet of a large portal site. Fourth overall in market share as a search engine. A powerful ISP operated as a subsidiary of Fujitsu. Widely known these days as the operator of the cocolog blog service. BIGLOBE OCN http://www.biglobe.ne.jp/ http://www.ocn.ne.jp/ An NEC-affiliated portal site. Third overall in market share as a search engine. Accessed by many users because it is set as the default home page for browsers on NEC-brand PCs. An ISP operated by large communications company NTT. 4. 4 Mixi MySpace.com http://mixi.jp/ http://www.myspace.com/ Japan's largest SNS site. SNS site with Japan's second largest user base. Widely known among music lovers. GREE Ameblo http://gree.jp http://ameblo.jp/ SNS site with particular advantages for access via cell phone. Company operates the largest blog service. Features many blogs started by celebrity entertainers. FC2 Blog Yahoo! Blog http://www.fc2.com/ http://blogs.yahoo.co.jp/ The only independent player among the large blog services. Said to have loose rules and to allow much freedom. A blog service that attracts many novice users. 5. 5 livedoor Blog Cocolog http://blog.livedoor.com/ http://www.cocolog-nifty.com/ A blog service considered to have relatively high-level functionality. Affiliated with portal site Livedoor. A blog service operated by Nifty. Google YouTube http://www.google.co.jp/ http://jp.youtube.com/ Search engine second only to Yahoo. Widely known movie sharing site. In recent years Japan's Liberal Democratic Party and other groups have established publicly accessible channels. Nikoniko-douga Watch Me TV http://www.nicovideo.jp/ http://www.watchme.tv/ A movie sharing site with more core-level users. Formerly had much illegal content; more recently has featured many independent creations (user-produced music and movies). A movie sharing site operated by Fuji Television. Features many tie-in events with Fuji Television, but does not boast the same market share as YouTube and Nikoniko-douga. 6. 6 GYAO DMM.com http://www.gyao.jp/ http://www.dmm.com/ An on-demand streaming movie site rolled out by USEN, a cable broadcasting concern. A streaming movie site that grew out of adult- entertainment content distribution. These days also features other content such as live concert films from popular rock bands. Photozou 2channel http://photozou.jp/ http://2ch.net/ A photo-sharing SNS. Has made its API publicly available, allowing users to develop mashups with external programs. Japan's largest anonymous bulletin-board collection. Has a reputation for negativity in the eyes of many Japanese. hatena Buzzurl http://www.hatena.ne.jp/ http://buzzurl.jp/ Operates a number of unique services. Among the most famous are "Hatena Diary" for blogging and "Hatena Bookmarks" for social bookmarking. The employees, including the company president, have strong personalities, and many are known as individuals in their own right. A large social bookmarking site that originated in Japan. 7. 7 livedoor clip OKWave http://clip.livedoor.com/ http://okwave.jp/ A social bookmarking site operated by large portal Livedoor. A Q&A site of the largest scale that originated in Japan. Kotaete-Net All About Japan http://www.kotaete-net.net/ http://allabout.co.jp/ A personal computer Q&A site operated by Microsoft. A site formerly affiliated with Recruit. Uses "guides" to educate users in a number of different areas. asahi.com Yomiuri On-Line http://www.asahi.com/ http://www.yomiuri.co.jp/ A news site operated by large newspaper company Asahi Shimbun. A news site operated by large newspaper company Yomiuri Shimbun. 8. 8 NIKKEI NET Iza! http://www.nikkei.co.jp/ http://www.iza.ne.jp/ A news site operated by large newspaper company Nihon Keizai Shimbun. A news site operated by large newspaper company Sankei Shimbun. Places heavy emphasis on interactive content and achieves a more unique flavor than other newspaper sites through measures such as allowing reporters to maintain their own blogs rather than simply posting news items. tabelog.com Bob And Andy http://tabelog.com/ http://www.bob-an.com/ tabelog.com is Japan's largest word-of-mouth gourmet site A recipe site operated by the company that publishes the lifestyle magazine "Pad." Cookpad @cosme http://cookpad.com/ http://www.cosme.net/ The largest recipe site. Word-of-mouth cosmetics site. Widely known as a successful CGM site. 9. 9 Wikipedia Oricon style http://ja.wikipedia.org/ http://www.oricon.co.jp/ An online dictionary with extremely broad name-recognition. An entertainment portal site operated by Oricon, a well-known music information service company. sportsnavi golfdigest http://sportsnavi.yahoo.co.jp/ http://www.golfdigest.co.jp/ A sports information site under the aegis of yahoo. A golf information site linked with the magazine of the same name. Also allows users to make reservations at golf courses. Ranking Japan Environmental goo http://www.rankingjapan.com/ http://eco.goo.ne.jp/ An entertainment site in which various kinds of information are presented in a ranking format. A site specializing on the environment under the aegis of large portal site goo. Features event information and columns on environmental topics. 10. 10 eiga.com kakaku.com http://eiga.com/ http://kakaku.com/ A movie information site. Users may post feedback on movies in addition to reading movie-related news. A site for comparing price data. Includes features for users to exchange information and opinions about merchandise. Ecnavi.jp weathernews http://ecnavi.jp/ http://weathernews.jp/ A general-purpose EC site with many usage points A weather information site operated by the world's largest civilian climate-data company Minna no Kabushiki (Everybody's Stock Market) Mahou no iLand (The Magic iLand) http://minkabu.jp/ http://company.maho.jp/ A community site for stock information. A mobile community. 11. 11 4 travel Oishasan-gaido (Guide To Doctors) http://4travel.jp/ http://www.10man-doc.co.jp/index.html A portal site on which users can do things like submit travel information or make hotel arrangements. A site on which users may select doctors based on factors such as geographical location and the details of a particular medical condition Vector Mado No Mori Windows Forest http://www.vector.co.jp/ http://www.forest.impress.co.jp/ A site that conducts logistical operations, beginning with software, for digital content A site on which an editorial team carefully selects, evaluates, and introduces to the user online software for Windows. Zenryaku Profiles About Me http://pr.cgiboy.com/ http://aboutme.jp/ A profile-creation site popular among younger users. A profile-creation site operated by Nifty. Also provides SNS-type features.
{ "redpajama_set_name": "RedPajamaC4" }
7,719
In Training: Is Physician "Wellness" a Better Goal than "Balance" in Residency? Abstractions: Working to Live or Living to Work? From the Regions: Regional Governance: Time for a Change? Policy Corner: 46 Million Americans Are Uninsured - Why Haven't We Fixed the Problem? Funding Corner: Variety and Innovation in Aging Research? Policy Corner: Performance Measurement and Pay for Performance Programs - Coming Soon to Your Practice? In Training: Who Said You Couldn't Go Home Again? President's Column: California Dreaming - The 2006 Annual Meeting in Los Angeles! Policy Corner: Health Services Research Funding - Is There Hope for More Federal Money?
{ "redpajama_set_name": "RedPajamaC4" }
487
<?php namespace yii2mod\rbac\models\search; use dosamigos\arrayquery\ArrayQuery; use Yii; use yii\base\Model; use yii\data\ArrayDataProvider; /** * Class BizRuleSearch * * @package yii2mod\rbac\models\search */ class BizRuleSearch extends Model { /** * @var string name of the rule */ public $name; /** * @var int the default page size */ public $pageSize = 25; /** * @inheritdoc */ public function rules(): array { return [ ['name', 'trim'], ['name', 'safe'], ]; } /** * Creates data provider instance with search query applied * * @param array $params * * @return ArrayDataProvider */ public function search(array $params): ArrayDataProvider { $query = new ArrayQuery(Yii::$app->authManager->getRules()); if ($this->load($params) && $this->validate()) { $query->addCondition('name', $this->name ? "~{$this->name}" : null); } return new ArrayDataProvider([ 'allModels' => $query->find(), 'sort' => [ 'attributes' => ['name'], ], 'pagination' => [ 'pageSize' => $this->pageSize, ], ]); } }
{ "redpajama_set_name": "RedPajamaGithub" }
7,978
Mircea Suciu Sibianu (n. 18 septembrie 1889, Brașov, comitatul Brașov, Monarhia Austro-Ungară – d. 1967, Băile Herculane, județul Caraș-Severin, România) a fost pseudonimul medicului și publicistului Mircea Mocanu, medic militar și autor de cărți și articole de popularizare a științei, inițiator al ideii de a se trece pe spatele rețetelor câteva reguli de bază privind igiena personală, membru al Gărzii Naționale Române din Brașov și delegat cu credențional la Marea Adunare Națională de la Alba Iulia din 1 decembrie 1918, din partea circumscripției electorale Cetate-Brașov. Studii Mircea Suciu Sibianu s-a născut pe data de 18 septembrie 1889 în Brașov, loc unde a urmat școala primară și mai apoi Liceul "Andrei Șaguna". Își continuă studiile în București și Budapesta, unde frecventează cursurile Facultăților de Medicină. Viața și activitatea Finalul Marelui Război îl găsește medic în Brașov, la Spitalul de oftalmologie, unde se încadrează ca membru al Gărzii Naționale Române. Este ales delegat cu credențional la Marea Adunare de la Alba Iulia din data de 1 decembrie 1918, din partea circumscripției electorale Cetate-Brașov, urmând ca împreună cu soția sa, Raveica, posesoare și acesta de credențional, să parcurgă drumul Brașov-Alba Iulia. După Marea Unire amenajează la sfatul medicului Nicolae Căliman, într-o secțiune a locuinței acestuia, primul laborator de analize din Brașov intrat în funcțiune în aprilie 1920. A fost un membru important al "ASTREI" din despărțământul Brașov, secția medicină, onorându-și acest post prin susținerea de conferințe cu subiecte de igienă și profilaxia bolilor în comunele din județele Brașov și Trei Scaune. Se număra și printre membrii Ligii "Dușmanii alcoolului și nicotinei" și ai asociației "Turing Clubului România", în perioada interbelică. Mircea Suciu Sibianu a fost inițiatorul ideii de a se scrie pe dosul rețetelor câteva reguli de educație sanitară. În cei peste 50 de ani de carieră medicală, acesta nu a avut nici o absență pe motiv de caz de boală, deoarece a respectat o serie de reguli, ce se aflau pe astfel de rețete, reguli la fel de actuale și astăzi. El considera că: "Sănătatea ta este o superbă cetățuie, pe care trebuie s-o înconjori din toate părțile spre a o apăra [...]." A fost, cum se poate observa, foarte preocupat de problemele sociale, căutând să îndrume oamenii spre un drum ce avea ca finalitate realizarea armoniei dintre dezvoltarea fizică și cea psihică, mișcare și cugetare, subliniind rolul important al voinței (de a face mișcare, de a renunța la alcool și tutun etc.) în cadrul factorilor naturali ce afectau sănătatea umană. Fiind un om pasionat de educația sanitară, a scris o serie de articole de popularizare a științei, în domenii cum sunt igiena alimentară sau probleme de sănătate publică, pentru reviste precum: Gazeta Transilvaniei, Prometeu, Ardealul, Kronstädter Zeitung sau Brassói Lapok. A publicat și o serie de lucrări precum: "Gânduri sănătoase" lucrare în două volume, primul apărut la București în 1929, iar al doilea, prefațat de către Nicolae Iorga, a apărut în anul 1938. "Noi orientări economico-sociale ale medicinei moderne", volum apărut la Brașov în anul 1944. "Un mare câștig economic: o mai bună împărțire a timpului", volum apărut tot la Brașov în anul 1946. Moare în anul 1967 ca urmare al unui accident nefericit în timpul unei excursii la Băile Herculane, când pierzându-și echilibrul, a căzut într-o prăpastie. Este îngropat la Brașov. Referințe Legături externe http://www.monitorulexpres.ro/?mod=monitorulexpres&p=ultora_cultura&s_id=184947&Nume-mari-ale-Brasovului-Primul-laborator-de-analize-medicale-din-Brasov-infiintat-de-Dr-Nicolae-Caliman – Articol ce amintește de crearea primului laborator de analize din Brașov în casa medicului Mircea Suciu Sibianu. http://clasate.cimec.ro/detaliu.asp?tit=Carte-veche--Mircea-Suciu-Sibianu--Ganduri-sanatoase&k=C17733E788214B139659A753D836F168 – Platformă a Patrimoniului Cultural Național în care apare cartea medicului, "Gânduri sănătoase", volumul I. https://www.techirghiol.com/techirghiolul - Articol în care sunt surprinse câteva intervenții ale medicului Mircea Suciu Sibianu în "Gazeta Transilvaniei". Medici români Medici_militari_români Delegați la Marea Adunare Națională de la Alba Iulia Nașteri în 1889 Români din Austro-Ungaria
{ "redpajama_set_name": "RedPajamaWikipedia" }
4,692
Randy V. Bradley is an assistant professor of Information Systems and Supply Chain Management in the Department of Marketing and Supply Chain Management at The University of Tennessee, Knoxville. He holds a PhD in Management of Information Technology and Innovation from Auburn University. Randy V. Bradley is an assistant professor of Information Systems and Supply Chain Management in the Department of Marketing and Supply Chain Management at The University of Tennessee, Knoxville. He holds a PhD in Management of Information Technology and Innovation from Auburn University. His research has appeared, or is forthcoming, in the Journal of Management Information Systems, MIS Quarterly Executive, Decision Sciences, the Journal of Business Logistics, the Information Systems Journal, the Journal of Information Technology, Communications of the Association for Information Systems, and Information Technology Governance and Service Management: Frameworks and Adaptations among others. His research interests include health care IT, the strategic value of enterprise architecture, IT governance, and IT in the supply chain.
{ "redpajama_set_name": "RedPajamaC4" }
7,163
Preajba may refer to several villages in Romania: Preajba, a village in Malu Mare Commune, Dolj County Preajba, a village in Poeni Commune, Teleorman County Preajba de Jos and Preajba de Pădure, villages in Teslui Commune, Dolj County Preajba Mare, a village in Târgu Jiu city, Gorj County
{ "redpajama_set_name": "RedPajamaWikipedia" }
2,392
Q: SQL server 2000, replication over WAN I seem to have big difficulties setting up the first replication ever between two SQL2000 instances. They both run in seperate WAN's (IP with port assigned for SQL-remote) but I have been able to connection them through remote-SQL so they appear in Enterprise Manager in both places. I cant figure out how to do this correctly, as I have tried many different approaches and got a lot of errors trying to do it. I dont know if its a faulty installation (with SP4) or some rights I need to ajust or what I am trying to do isnt possible. My idea is to take the primary server (lets call it MASTER or #5) and then PUBLISH some of its databases with replication to the secondary/backup server (lets call it SLAVE or #4) I've added a "sync account login" on both, with same name and password to see if that would make things easier. I have FULL administrative access, so any needed changes can be made to this setup - as long as I get it fixed soon. (Have been starting to consider leaving SQL-server completely if this has to take so long time to fix, and check out MySQL or something else)... BUT... to the current task/situation: We have two servers, one in production and one in development, and I would REALLY like to have changes MERGE between these two "single instances". There is NO ActiveDirectory mechanism near them, so they are 100% stand-alone machines. When I try to configure the master as "Distributor/Publisher" the Wizard halts with error of something being "(null)" ??? I get some weird error codes that tells me nothing usefull. So I was wondering, is there a "guided tour" somewhere on HOW to do this in the right order, so that I can check if I have missed something before trying to set it up. Some rights, some flags, some patches or extra firewall ports or something weird needed for replication. It looks so easy in every example I have found so far, but it just doesnt work ... HELP!... please :-) A: To get replication running between two servers which aren't on the same domain, you'll need to do one of the following. * *Add the remote server name to the other servers host file. *Add the remote server to the local domains DNS/WINS servers. After that each machine should be able to access the other via the local name which is required for replication to work. Once name resolution is working ok you should be able to just run through the wizard to get things setup. Now keep in mind that it is usually recommended to not replicate data between production and dev, especially with merge replication as any changes made in your development environment will be replicated to the production database. Also keep in mind that once you replicate a table you can't make any schema changes to those tables using the normal ALTER TABLE commands. You'll have to use the replication procedures to add columns. Another catch is that SQL 2000 replication will be adding a guid column to every table that you are replicating. Where is the process breaking? Are you able to get the distributor setup?
{ "redpajama_set_name": "RedPajamaStackExchange" }
6,436
L'île rouge (internationaler Titel: Red Island) ist ein belgisch-französischer Spielfilm von Robin Campillo. Im Mittelpunkt des semi-autobiografischen Dramas steht ein heranwachsender Junge (dargestellt von Charlie Vauselle), der in den 1970er-Jahren auf einem französischen Militärstützpunkt im Indischen Ozean aufwächst. Ein genauer Kinostart ist noch nicht bekannt. Handlung Madagaskar, Anfang der 1970er-Jahre: Einige wenige Streitkräfte leben mit ihren Familien auf Ivato, einem der letzten französischen Militärstützpunkte im Ausland, einem Relikt des untergehenden französischen Kolonialreichs. Unter ihnen befindet sich auch der 10-jährige Thomas, der für die Comicbuchheldin Fantômette schwärmt. Neugierig erkundet er seine Umgebung, die von Virilität geprägt ist. Thomas kommt mit Sinnlichkeit, aber auch mit Gewalt in Kontakt, insbesondere durch seine Mutter Colette. Als er sich eines Nachts als Fantômette verkleidet und allein auf der Militärbasis umherwandert, muss sich das sorglose Kind einer neuen Realität stellen. Thomas lernt die andere Seite des kolonialen Kontexts kennen zwischen Weißen und Schwarzen, Kindern und Erwachsenen, Realität und Fiktion. Fortan versucht Thomas als Vermittler zwischen den beiden Welten zu fungieren. Entstehungsgeschichte Drehbuch und biografischer Hintergrund L'île rouge (Arbeitstitel: Vazaha, Les blancs, dt. "Die Weißen" bzw. École de l'air, dt. etwa "Flugschule") ist der vierte Spielfilm des französischen Filmemachers Robin Campillo und die erste Kinoarbeit seit seinem preisgekrönten Werk 120 BPM (2017). Für das Drehbuch tat er sich erneut mit Gilles Marchand zusammen, mit dem er das Skript zu seinem Film Eastern Boys – Endstation Paris (2013) verfasst hatte. L'île rouge wurde als bis dahin persönlichstes Projekt Campillos angepriesen und ist autobiografisch geprägt – sein Vater Marcel war Leutnant der französischen Luftwaffe und er begleitete ihn mit seiner Mutter Simone bei Auslandsaufenthalten in die ehemaligen französischen Kolonien. So auch für drei Jahre nach Madagaskar, wo Campillos Familie auf der Militärbasis Ivato lebte und diese nicht verlassen durfte. Jeden Dienstagabend fanden zur Unterhaltung des Militärpersonals Filmvorführungen statt, in die sich der junge Campillo nach dem Schulunterricht heimlich hineinschlich, nur um den Ton mitanzuhören. Erst am nächsten Tag konnte er in Erfahrung bringen, um was für einen Film es sich handelte. Als einen der prägendsten Filme in dieser Zeit bezeichnete er Jean-Luc Godards Science-Fiction-Film Lemmy Caution gegen Alpha 60 (1965), den er als 10-Jähriger auf Madagaskar sah. Zwar wurde der Film von den Soldaten ausgebuht, war aber der Beginn seiner Liebe zur französischen Nouvelle Vague und besonders zu Godard und Éric Rohmer. Eigenen Angaben zufolge fasste Campillo bereits im Alter von sechs Jahren den Entschluss, Filmemacher zu werden. Dreharbeiten und Produktion Für das Projekt tat sich Campillo mit seinen langjährigen Weggefährten Marie-Ange Luciani (Produktion), Jeanne Lapoirie (Kamera), Arnaud Rebotini (Filmmusik), Emmanuelle Duplay (Szenenbild) und Isabelle Pannetier (Kostüme) zusammen. Für die Hauptrollen wurden der junge Charlie Vauselle als Thomas, Quim Gutiérrez, Nadia Tereszkiewicz und Sophie Guillemin verpflichtet. Die Dreharbeiten sollten ursprünglich im Jahr 2020 auf Madagaskar beginnen. Aufgrund der COVID-19-Pandemie und eines verhängten Lockdowns wurde die Vorproduktion von L'île rouge auf der Insel unterbrochen, kurz bevor Campillo und Teile des Filmteams dem Produktionsleiter nach Madagaskar folgen sollten. Die Dreharbeiten wurden daraufhin auf August 2021 verschoben. Die Drehzeit wurde auf neun Wochen bis November 2021 festgesetzt. Drehorte waren neben Madagaskar in Frankreich Paris, Salon-de-Provence und die Region Pays de la Loire. Der Film ist eine belgisch-französische Koproduktion, produziert von Marie-Ange Luciani für Les Films de Pierre. Als Koproduzenten traten France 3 Cinéma, Memento Films Production und die belgische Scope Pictures in Erscheinung. Im Vorfeld sicherten sich France 3, Canal+ und Ciné+ Übertragungsrechte. Gefördert wurde L'île rouge vom Centre national du cinéma et de l'image animée (CNC), von der Region Pays de la Loire, der Fédération Wallonie-Bruxelles, Procirep, Creative Europe, Cineventure, La Banque Postale Image, Cinecap und Cofinova. Die Produktionskosten wurden mit 7,2 Mio. Euro beziffert. Veröffentlichung In Frankreich soll L'île rouge von Memento Distribution in die Kinos gebracht werden. Die weltweiten Verwertungsrechte sicherte sich Playtime. Weblinks Offizielle Website (englisch) Profil bei allocine.fr (französisch) Einzelnachweise Angekündigter Film Belgischer Film Französischer Film Filmdrama Historienfilm Jugendfilm
{ "redpajama_set_name": "RedPajamaWikipedia" }
8,946
Wieża Więzienna w Gdańsku Baszta więzienna w Raciborzu Käfigturm – Berno
{ "redpajama_set_name": "RedPajamaWikipedia" }
108
HomeNewsThe Village Square The Village Square: October 3, 2016 By Ruel Gaviola on October 3, 2016 The Village Square I was at a local retailer last week, checking out some of the Halloween decor for sale when I noticed there were a few Christmas items already on the shelves. I was too stunned to take a photo, but when I got home I thought that a How Soon Can We Start Selling Christmas Decorations board game could be a fun filler and be sold year-round to gamers. Tasty Games Tasty Minstrel Games announced release dates for its upcoming games: Orléans: Invasion (October 26), Ars Alchimia (BGG.Con – November 16), Ponzi Scheme (BGG.Con – November 16), and The Oracle of Delphi (BGG.Con – November 16). Source: http://us2.campaign-archive1.com/?u=b6c6621585cb5a03970bd4867&id=e2bd57dcfe&e=5359385f37 Come Sail Away W. Eric Martin previewed Splendor designer Marc Andre's new game, Sail Away. The German branch of Hasbro plans to release it at SPIEL. Sail Away "features tiny actions that slowly build to something bigger, with players … trying to move resources off of tropical islands in order to fulfill contracts for ships, with each filled ship then providing a bonus of some sort." Source: https://boardgamegeek.com/blogpost/58180/game-preview-spiel-2016-sail-away-or-carry-me-and Tabletop Windowed Wil Wheaton's Tabletop is going to be a windowed release for its upcoming season four. It will be part of Alpha, a new subscription video network from Legendary Digital Networks featuring content from Nerdist and Geek & Sundry. According to ICv2.com, Tabletop will premiere on Alpha on November 2, and be available free on YouTube "early next year." Apparently, Wil Wheaton is not happy with this new arrangement. Source: http://icv2.com/articles/news/view/35649/tabletop-goes-windowed-release Rebellion on Steam Our friends at boardgamebabylon.com report that HexWar Games and Academy Games have partnered to bring 1775: Rebellion to Steam, in which players "command the armies of the British Redcoats, English Loyalists, German Hessians, American Regulars, Patriots, French Regulars and Native Americans to decide the fate of the Americas." Source: http://boardgamebabylon.com/2016/10/01/press-release-hexwar-games-releases-1775-rebellion Delving into Descent Coming soon from Fantasy Flight Games is The Delve, a new addition to the Road of Legend app for Descent: Journeys in the Dark. "Over the course of a single session, you and your fellow heroes will advance through an ever-changing pocket dimension, carrying out the goals given to you by the Caretaker—the ruler of this strange domain. If you can accomplish your objectives, the Caretaker will reward you with experience, loot, and your eventual freedom. But if you fail, the terrifying dark creatures trapped in this world will tear you to pieces." Source: https://drafts.fantasyflightgames.com/en/news/2016/9/30/delving-deep/ War of the Ring Pre-Order According to purplepawn.com, pre-orders are being taken until October 5th for the deluxe rules, strategy guide, and game board for War of the Ring: Second Edition. It will contain "extra-size War of the Ring gameboard (two boards, each 64 x 88 cm) with UV and hot foil printing, the deluxe edition of the Game Rules (56 pages), and the Strategy Companion written by Kristofer Bengtsson (104 pages). Each of the two books is hardbound, with quarterbinding in cloth paper." It will be ready this December, at the same time as the War of the Ring Anniversary release. Source: http://www.purplepawn.com/2016/09/war-of-the-ring-anniversary-release-deluxe-rules-strategy-guide-and-gameboard-available-for-pre-order-today/ Online Splendor Players can now play multiplayer games of Splendor online, across all platforms. The Days of Wonder blog notes, "Behave with dignity and play your games until the end to increase your Karma. Disconnect in the middle of a game and your Karma will decrease. Set the minimal level of Karma required to enter your games in order to play with the most righteous players." Source: http://blog.daysofwonder.com/2016/10/01/new-online-multiplayer-mode-in-splendor/ Asmodee provides a closer look at combat in the upcoming Conan. "[I]t would be a great mistake to overlook the sharpness of Conan's intellect. Similarly, for all that Conan the board game will thrust you into the thick of brawny, bloody, and fast-paced battles, there's also much more to the Conan board game than its organic combat system." Source: http://drafts.asmodee.us/en/news/2016/9/30/blood/ Uplifting Asmodee Spotted in Asmodee's latest news section: our very own @UpliftAndrew's amazing pictures of game components. They sum up how people feel about his photographs: "We knew our game pieces were cool, but wow! Color us impressed." Source: http://drafts.asmodee.us/en/news/2016/9/30/this-month-at-asmodee-sep-16/ https://twitter.com/UpliftAndrew Monthly Guardian The Guardian is now publishing a board games column every month. The first one features Ice Cool, Ticket to Ride: Rails and Sails, Mystic Vale, and Sneaky Cards. Source: https://www.theguardian.com/lifeandstyle/2016/sep/30/boarders-hoard-board-game-column-ice-cool-ticket-to-ride-mystic-vale-sneaky-cards Dice by the Pound Nothing to see here except one gamer's dice collection. Source: https://imgur.com/gallery/hV2B0#gOf6gUa h/t http://laughingsquid.com/gamer-meticulously-arranges-and-displays-his-extensive-dice-collection/ October 8. Mid Meeple. Las Vegas, Nevada. October 14-16. Big Bad Con. Walnut Creek, California. October 15-16. RetroWorld Expo 2016. Wallingford, Connecticut. October 21-23. What-Khan. Rockford, Illinois. October 28-30. ConnCon (Falcon 2016). Stamford, Connecticut. November 4-6. Carnage Royale. Killington, Vermont. November 11-13. San Diego Historical Games Convention. San Diego, California. November 11-13. MEPACON. Scranton, Pennsylvania. November 25-27. Chessiecon. Timonium, Maryland. Tags: Asmodeeboard game conventionsboard game newsfantasy flight gamesTasty Minstrel GamesThe Village Square Previous ArticleReview: Tutti Frutti Next Article Review: Eclipse The Village Square: December 16, 2019 The Village Square: December 2, 2019 The Village Square: November 18, 2019
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
7,145
\section{Introduction} Pose guided person image generation~\cite{ma2017pose}, which aims to synthesize a realistic-looking person image in a target pose while preserving the source appearance details (as depicted in Figure~\ref{example}), has aroused extensive attention due to its wide range of practical applications for image editing, image animation, person re-identification (ReID), and so on. Motivated by the development of Generative Adversarial Networks (GANs) in the image-to-image transformation task~\cite{zhu2017unpaired}, many researchers~\cite{ma2017pose,ma2018disentangled,zhu2019progressive,men2020controllable} attempted to tackle the person image generation problem within the framework of generative models. However, as CNNs are not good at tackling large spatial transformation~\cite{ren2020deep}, these generation-based models may fail to handle the feature misalignment caused by the spatial deformation between the source and target image, leading to the appearance distortions. To deal with the feature misalignment, recently, appearance flow based methods have been proposed~\cite{ren2020deep,liu2019liquid,han2019clothflow} to transform the source features to align them with the target pose, modeling the dense pixel-to-pixel correspondence between the source and target features. Specifically, the appearance flow based methods aim to calculate the 2D coordinate offsets (i.e., appearance flow fields) that indicate which positions in the source features should be sampled to reconstruct the corresponding target features. With such flow mechanism, the existing flow based methods can synthesize target images with visually plausible appearances for most cases. However, it is still challenging to generate satisfying results when there are large pose discrepancies between the source and target images (see Figure~\ref{qua_result} for example). \begin{figure}[t] \centering \includegraphics[width= 0.46\textwidth]{example.png} \caption{The generated person images in random target poses by our method.} \label{example} \end{figure} To tackle this challenge, we propose a structure-aware flow based method for high-quality person image generation. The key insight of our work is, incorporating the structure information can provide important priors to guide the network learning, and hence can effectively improve the results. First, we observe that the human body is composed of different parts with different motion complexities w.r.t. pose changes. Hence, instead of using a unified network to predict the overall appearance flow field of human body, we decompose the human body into different semantic parts (e.g., head, torso, and legs) and employ different networks to estimate the flow fields for these parts separately. In this way, we not only reduce the difficulty of learning the complex overall pose changes, but can more precisely capture the pose change of each part with a specific network. Second, for close pixels belonging to each part of human body, the appearance features are often semantically correlated. For example, the adjacent positions inside the arm should have similar appearances after being transformed to a new pose. To this end, compared to the existing methods which generate features at target positions independently with limited receptive fields, we introduce a \textit{hybrid dilated convolution block} which is composed of sequential convolutional layers with different dilation rates~\cite{yu2015multi,chen2017rethinking,li2018csrnet} to effectively capture the short-range semantic correlations of local neighbors inside human parts by enlarging the receptive field of each position. Third, the semantic correlations also exist for the features of different human parts that are far away from each other, owning to the symmetry of human body. For instance, the features of the left and right sleeves are often required to be consistent. Therefore, we design a lightweight yet effective non-local component named \textit{pyramid non-local block} which combines the multi-scale pyramid pooling~\cite{he2015spatial,kim2018parallel} with the standard non-local operation~\cite{wang2018non} to capture the long-range semantic correlations across different human part regions under different scales. Technically, our network takes as input a source person image and a target pose, and synthesizes a new person image in the target pose while preserving the source appearance. The network architecture is composed of three modules. The part-based flow generation module divides the human joints into different parts, and deploys different models to predict local appearance flow fields and visibility maps of different parts respectively. Then, the local warping module warps the source part features extracted from the source part images, so as to align them with the target pose while capturing the short-range semantic correlations of local neighbors within the parts via the \textit{hybrid dilated convolution block}. Finally, the global fusion module aggregates the warped features of different parts into the global fusion features and further applies the \textit{pyramid non-local block} to learn the long-range semantic correlations among different part regions, and finally outputs a synthesized person image. The main contributions can be summarized as: \begin{itemize} \item We propose a structure-aware flow based framework for pose guided person image generation, which can synthesize high-quality person images even with large pose discrepancies between the source and target images. \item We decompose the task of learning the overall appearance flow field into learning different local flow fields for different semantic body parts, which can ease the learning and capture the pose change of each part more precisely. \item We carefully design the modules in our network to capture the local and global semantic correlations of features within and among human parts respectively. \end{itemize} \begin{figure*}[!t] \centering \includegraphics[width= 0.96\textwidth]{framework2.png} \caption{Overview of the proposed method. It mainly consists of three modules: the part-based flow generation module, the local warping module, and the global fusion module.} \label{framework} \end{figure*} \section{Related Work} Pose guided person image generation can be regarded as a typical image-to-image transformation problem~\cite{isola2017image,zhu2017unpaired} where the goal is to convert a source person image into a target person image conditioned on two constraints: (1) preserving the person appearance in the source image and (2) deforming the person pose into the target one. Ma et al.~\cite{ma2017pose} proposed a two-stage generative network named $\rm PG^2$ to synthesize person images in a coarse-to-fine way. Ma et al.~\cite{ma2018disentangled} further improved the performance of $\rm PG^2$ by disentangling the foreground, background, and pose with a multi-branch network. However, the both methods require a complicated staged training process and have large computation burden. Zhu et al.~\cite{zhu2019progressive} proposed a progressive transfer network to deform a source image into the target image through a series of intermediate representations to avoid capturing the complex global manifold directly. However, the useful appearance information would degrade inevitably during the sequential feature transfers, which may lead to the blurry results lacking vivid appearance details. Essner et al.~\cite{esser2018variational} combined the VAE~\cite{kingma2013auto} and U-Net~\cite{ronneberger2015u} to model the interaction between appearance and shape. However, the common skip connections of U-Net can't deal with the feature misalignments between the source and target pose reliably. To tackle this issue, Siarohin et al.~\cite{siarohin2018deformable} further proposed the deformable skip connections to transform the local textures according to the local affine transformations of certain sub-parts. However, the degrees of freedom are limited (i.e., 6 for affine), which may produce inaccurate and unnatural transformations when there are large pose changes. Recently, a few flow-based methods have been proposed to take advantage of the appearance flow~\cite{zhou2016view,ren2019structureflow} to transform the source image to align it with the target pose. Han et al.~\cite{han2019clothflow} introduced a three-stage framework named ClothFlow to model the appearance flow between source and target clothing regions in a cascaded manner. However, they warp the source image at the pixel level instead of the feature level, which needs an extra refinement network to handle the invisible contents. Li et al.~\cite{li2019dense} leveraged the 3D human model to predict the appearance flow, and warped both the encoded features and the raw pixels of source image. However, they require to fit the 3D human model to all images to obtain the annotations of appearance flows before the training, which is too expensive to limit its application. Ren et al.~\cite{ren2020deep} designed a global-flow local-attention framework to generate the appearance flow in an unsupervised way and transform the source image at the feature level reasonably. However, this method directly takes the overall source and target pose as input to predict the appearance flow of the whole human body, which may be unable to tackle the large discrepancies between the source and target pose reliably. Besides, this method produces features at each target position independently and doesn't consider the semantic correlations among target features at different locations. \section{The Proposed Method} Figure~\ref{framework} illustrates the overall framework of our network. It mainly consists of three modules: the part-based flow generation module, the local warping module, and the global fusion module. In the following sections, we will give a detailed description of each module. \subsection{Part-based Flow Generation Module} We first introduce a few notations. Let $P_{s}\in \mathbb{R}^{18\times h\times w}$ and $P_{t}\in \mathbb{R}^{18\times h\times w}$ represent the overall pose of the source image $I_{s}\in \mathbb{R}^{3\times h\times w}$ and target image $I_{t}\in \mathbb{R}^{3\times h\times w}$ respectively, where the 18 channels of the pose correspond to the heatmaps that encode the spatial locations of 18 human joints. The joints are extracted with the OpenPose~\cite{cao2017realtime}. As shown in Figure~\ref{framework}, our part-based flow generation module first decomposes the overall pose into different sub-poses via grouping the human joints into different parts based on the inherent connection relationship among them, Then, different sub-models $G_{flow}^{local}=\left \{ G_{flow}^{head},G_{flow}^{torso},G_{flow}^{leg} \right \}$ are deployed to generate the local appearance flow fields and visibility maps of corresponding human parts respectively. Specifically, let $P_{s}^{local}=\left \{ P_{s}^{head},P_{s}^{torso},P_{s}^{leg} \right \}$ and $P_{t}^{local}=\left \{ P_{t}^{head},P_{t}^{torso},P_{t}^{leg} \right \}$ denote the decomposed source and target sub-poses, where each sub-pose corresponds to a subset of the 18 heatmaps of human joints. The sub-models $G_{flow}^{local}$ take as input $P_{s}^{local}$ and $P_{t}^{local}$, and output the local appearance flow fields $W^{local}$ and visibility maps $V^{local}$: \begin{equation} W^{local},V^{local} = G_{flow}^{local}(P_{s}^{local},P_{t}^{local}), \end{equation} where $W^{local}=\left \{ W^{head},W^{torso},W^{leg} \right \}$ records the 2D coordinate offsets between the source and target features of corresponding parts, and $V^{local}=\left \{ V^{head},V^{torso},V^{leg} \right \}$ stores confidence values between 0 and 1 representing whether the information of certain target positions exists in the source features. \subsection{Local Warping Module} The generated local appearance flow fields $W^{local}$ and visibility maps $V^{local}$ provide important guidance on understanding the spatial deformation of each part region between the source and target image, specifying which positions in the source features could be sampled to generate the corresponding target features. Therefore, our local warping module exploits this information to model the dense pixel-to-pixel correspondence between the source and target features. As shown in Figure~\ref{framework}, we first crop different part images from the source image, and encode them into the corresponding source part image features $F_{s}^{local}=\left \{ F_{s}^{head},F_{s}^{torso},F_{s}^{leg} \right \}$. Then, under the guidance of generated local appearance flow fields $W^{local}$, our local warping module warps $F_{s}^{local}$ to obtain the warped source features $F_{s,w}^{local}=\left \{ F_{s,w}^{head},F_{s,w}^{torso},F_{s,w}^{leg} \right \}$ aligned with the target pose. Specifically, for each target position $p=(x,y)$ in the features $F_{s,w}^{local}$, a sampling position is allocated according to the coordinate offsets $\triangle p= (\triangle x,\triangle y)$ recorded in the flow fields $W^{local}$. The features at target position are fetched from the corresponding sampling position in the source features by the bilinear interpolation. Further details are available in our supplementary material. The procedure can be written as: \begin{equation} F_{s,w}^{local}=G_{warp}(F_{s}^{local},W^{local}). \end{equation} \begin{figure}[h] \centering \includegraphics[width= 0.46\textwidth]{local.png} \caption{The local warping module. It warps the source features encoded from the corresponding part images to align them with the target pose while capturing the short-range semantic correlations of local neighbors within the parts.} \label{local} \end{figure} Considering not all appearance information of the target image can be found in the source image due to different visibilities of the source and target pose, we further take advantage of the generated local visibility maps $V^{local}$ to select the reasonable features between $F_{s,w}^{local}$ and the local target pose features $F_{pose}^{local}=\left \{ F_{pose}^{head},F_{pose}^{torso},F_{pose}^{leg} \right \}$ which are encoded from the target sub-poses. The feature selection using visibility maps is defined as: \begin{equation} F_{s,w,v}^{local} = V^{local}\cdot F_{s,w}^{local}+( 1-V^{local} )\cdot F_{pose}^{local}, \end{equation} where $F_{s,w,v}^{local}=\left \{ F_{s,w,v}^{head},F_{s,w,v}^{torso},F_{s,w,v}^{leg} \right \}$ denotes the selected features for different parts. At last, in order to perceive local semantic correlations inside human parts, as shown in Figure~\ref{local}, we further introduce a \textit{hybrid dilated convolution block} which is composed of sequential convolutional layers with different dilation rates (e.g., $\left \{1, 2\right \}$ in our implementation) to capture the short-range semantic correlations of local neighbors within parts by enlarging the receptive field of each position. Specifically, a dilated convolution with rate $r$ can be defined as: \begin{equation} y(m,n)=\sum_{i}\sum_{j}x(m+r\times i,n+r\times j)w(i,j), \end{equation} where $y(m,n)$ is the output of dilated convolution from input $x(m,n)$, and $w(i,j)$ is the filter weight. Let $G_{hdcb}$ represent the \textit{hybrid dilated convolution block}. The final warped local image features of different human parts $F_{warp}^{local}=\left \{ F_{warp}^{head},F_{warp}^{torso},F_{warp}^{leg} \right \}$ can be obtained by: \begin{equation} F_{warp}^{local} = G_{hdcb}(F_{s,w,v}^{local}). \end{equation} \subsection{Global Fusion Module} Let $F_{pose}^{global}$ denote the global target pose features encoded from the overall target pose $P_{t}$, which can provide additional context as to where different parts should be located in the target image. Concatenating the warped image features of different parts $F_{warp}^{local}$ and the global target pose features $F_{pose}^{global}$ together as input, the global fusion module first aggregates these local part features into the preliminary global fusion features $F_{fusion}$: \begin{equation} F_{fusion} = G_{fusion}\left ( F_{warp}^{local},F_{pose}^{global}\right ). \end{equation} \begin{figure}[h] \centering \includegraphics[width= 0.47\textwidth]{global1.png} \caption{The global fusion module. It aggregates the warped features of different parts into the global fusion features and captures the non-local semantic correlations among different human parts.} \label{global} \end{figure} Due to the symmetry of human body, there can also exist important semantic correlations for the features of different human parts with long distances. We therefore design a lightweight yet effective non-local component named \textit{pyramid non-local block} which incorporates the multi-scale pyramid pooling with the standard non-local operation to capture such long-range semantic correlations across different human part regions under different scales. Specifically, as shown in Figure~\ref{global}, given the preliminary global fusion features $F_{fusion}$, we first use the multi-scale pyramid pooling to adaptively divide them into different part regions and select the most significant global representation for each region, producing hierarchical features with different sizes (e.g., $4\times4,6\times6$) in parallel. Next, we apply the standard non-local operations on the pooled features at different scales respectively to obtain the response at a target position by the weighted summation of features from all positions, where the weights are the pairwise relation values recorded in the generated relation maps (which are visualized in our experiments). Specifically, given the input features $x$, the relation maps $R$ are calculated by $R=softmax(\theta \left ( x \right )^{T}\phi \left ( x \right ))$, where $\theta \left ( \cdot \right )$ and $\phi \left ( \cdot \right )$ are two feature embeddings implemented as $1\times1$ convolutions. Let $G_{pnb}$ denote the \textit{pyramid non-local block}. The final global features $F_{global}$ are obtained via: \begin{equation} F_{global} = G_{pnb}\left ( F_{fusion} \right ). \end{equation} Finally, the target person image $\hat{I_{t}}$ is generated from the global features $F_{global}$ using a decoder network $Dec$ which contains a set of deconvolutional layers: \begin{equation} \hat{I_{t}}=Dec\left ( F_{global} \right ). \end{equation} \begin{table*}[t] \centering \resizebox{0.98\textwidth}{!}{ \begin{tabular}{@{}c|ccccccc|cccc@{}} \toprule \multirow{2}{*}{Model} & \multicolumn{7}{c|}{Market-1501} & \multicolumn{4}{c}{DeepFashion} \\ \cmidrule(l){2-12} & FID$\downarrow$ & LPIPS$\downarrow$ & Mask-LPIPS$\downarrow$ & SSIM$\uparrow$ & Mask-SSIM$\uparrow$ & PSNR$\uparrow$ & Mask-PSNR$\uparrow$ & FID$\downarrow$ & LPIPS$\downarrow$ & SSIM$\uparrow$ & PSNR$\uparrow$ \\ \midrule VU-Net & 24.386 & 0.3211 & 0.1747 & 0.242 & \underline{0.801} & 13.664 & 19.102 & 13.836 & 0.2637 & \underline{0.745} & 16.255 \\ Def-GAN & 29.035 & 0.2994 & 0.1496 & 0.276 & 0.793 & \underline {14.391} & 20.425 & 26.283 & \underline {0.2330} & \textbf{0.747} & \underline {17.524} \\ PATN & 24.917 & 0.3196 & 0.1590 & \underline {0.282} & 0.799 & 14.241 & \underline {20.482} & 20.399 & 0.2533 & 0.671 & 16.621 \\ DIST & \textbf{21.539} & \underline {0.2817} & \underline {0.1482} & 0.281 & 0.796 & 14.337 & 20.421 & \textbf{7.629} & 0.2341 & 0.714 & 17.445 \\ Ours & \underline {24.254} & \textbf{0.2796} & \textbf{0.1464} & \textbf{0.290} & \textbf{0.802} & \textbf{14.526} & \textbf{20.726} & \underline {8.755} & \textbf{0.1815} & 0.726 & \textbf{18.030} \\ \bottomrule \end{tabular} } \caption{Quantitative comparison with state-of-the-art methods on the Market-1501 and DeepFashion datasets. The first and second best results are bolded and underlined respectively.} \label{table1_2} \end{table*} \subsection{Training} We train our model in two stages. First, without the ground truth of appearance flow fields and visibility maps, we train the part-based flow generation module in an unsupervised manner using the sampling correctness loss~\cite{ren2019structureflow, ren2020deep}. Since our part-based flow generation module contains three sub-models corresponding to different parts, we train them together using the overall loss defined as: \begin{equation} L_{sam} = L_{sam}^{head} + L_{sam}^{torso} + L_{sam}^{leg}, \end{equation} where $L_{sam}^{head}$,$L_{sam}^{torso}$, and $L_{sam}^{leg}$ denote the sampling correctness loss for each part respectively. The sampling correctness loss constrains the appearance flow fields to sample positions with similar semantics via measuring the similarity between the warped source features and ground truth target features. Refer to the supplementary material for details. Then, with the pre-trained part-based flow generation module, we train our whole model in an end-to-end way. The full loss function is defined as: \begin{equation} L=\lambda _{1}L_{sam}+\lambda _{2}L_{rec}+\lambda _{3}L_{adv}+\lambda _{4}L_{per}+\lambda _{5}L_{sty}, \end{equation} where $L_{rec}$ denotes the reconstruction loss which is formulated as the L1 distance between the generated target image $\hat{I_{t}}$ and ground truth target image $I_{t}$, \begin{equation} L_{rec}=\left \| I_{t} - \hat{I_{t}} \right \|_{1}. \end{equation} $L_{adv}$ represents the adversarial loss~\cite{goodfellow2014generative} which uses the discriminator $D$ to promote the generator $G$ to synthesize the target image with sharp details, \begin{equation} L_{adv}=\mathbb{E}\left [ log(1-D(G(I_{s},P_{s},P_{t}))) \right ]+\mathbb{E}\left [ logD(I_{t}) \right ]. \end{equation} $L_{per}$ denotes the perceptual loss~\cite{johnson2016perceptual} formulated as the L1 distance between features extracted from special layers of a pre-trained VGG network, \begin{equation} L_{per}=\sum_{i}\left \| \phi _{i}(I_{t})-\phi _{i}(\hat{I_{t}}) \right \|_{1}, \end{equation} where $\phi _{i}$ is the feature maps of the i-th layer of the VGG network pre-trained on ImageNet~\cite{russakovsky2015imagenet}. $L_{sty}$ denotes the style loss~\cite{johnson2016perceptual} which uses the Gram matrix of features to calculate the style similarity between the images, \begin{equation} L_{sty}=\sum_{j}\left \| G _{j}^{\phi}(I_{t})- G _{j}^{\phi}(\hat{I_{t}}) \right \|_{1}, \end{equation} where $ G _{j}^{\phi}$ is the Gram matrix constructed from features $\phi _{j}$. \paragraph{Implementation Details.} Our model is implemented in the PyTorch framework using one NVIDIA GTX 1080Ti GPU with 11GB memory. We adopt the Adam optimizer ($\beta _{1}=0,\beta _{2}=0.99$)~\cite{kingma2014adam} to train our model and the learning rate is fixed to 0.001 in all experiments. For the Market-1501 dataset~\cite{zheng2015scalable}, we train our model using the images with resolution of $128\times64$, and the batch size is set to 8. For the DeepFashion dataset~\cite{liu2016deepfashion}, our model is trained using the images with resolution of $256\times256$, and the batch size is 6. \begin{figure*}[t] \centering \includegraphics[width= 0.98\textwidth]{qua_result1.png} \caption{Qualitative comparison with state-of-the-art methods on the DeepFashion(left) and Market-1501(right) datasets.} \label{qua_result} \end{figure*} \section{Experiment} In this section, we perform extensive experiments to demonstrate the superiority of the proposed method over state-of-the-art methods. Furthermore, we conduct the ablation study to verify the contribution of each component in our model. \paragraph{Datasets.} We conduct our experiments on the ReID dataset Market-1501~\cite{zheng2015scalable} and the In-shop Clothes Retrieval Benchmark DeepFashion~\cite{liu2016deepfashion}. The Market-1501 dataset contains 32,668 low-resolution images ($128\times64$) which vary enormously in the pose, background, and illumination. Meanwhile, the DeepFashion dataset contains 52,712 person images ($256\times256$) with various appearances and poses. For a fair comparison, we split the two datasets following the same setting in~\cite{ren2020deep}. Consequently, we pick 263,632 training pairs and 12,000 testing pairs for the Market-1501 dataset. For the DeepFashion dataset, we randomly select 101,966 pairs for training and 8,570 pairs for testing. \paragraph{Metrics.} It remains an open problem to evaluate the quality of generated images reasonably. Following the previous works~\cite{siarohin2018deformable,zhu2019progressive,ren2020deep}, we use the common metrics such as Learned Perceptual Image Patch Similarity (LPIPS)~\cite{zhang2018unreasonable}, Fr$\acute{e}$chet Inception Distance (FID)~\cite{heusel2017gans}, Structural Similarity (SSIM)~\cite{wang2004image}, and Peak Signal-to-noise Ratio (PSNR) to assess the quality of generated images quantitatively. Specifically, both LPIPS and FID calculate the perceptual distance between the generated images and ground truth images in the feature space w.r.t. each pair of samples and global distribution, respectively. Meanwhile, SSIM and PSNR indicate the similarity between paired images in raw pixel space. For the Market-1501 dataset, we further calculate the masked results of these metrics to exclude the interference of the backgrounds. Furthermore, considering that these quantitative metrics may not fully reflect the image quality~\cite{ma2017pose}, we perform a user study to qualitatively evaluate the quality of generated images. \subsection{4.1 Comparison with State-of-the-art Methods} \paragraph{Quantitative Comparison.} As shown in Table~\ref{table1_2}, we compare our method with four state-of-the-art methods including VU-Net~\cite{esser2018variational}, Def-GAN~\cite{siarohin2018deformable}, PATN~\cite{zhu2019progressive}, and DIST~\cite{ren2020deep} on the Market-1501 and DeepFashion datasets. Specifically, we download the pre-trained models of state-of-the-art methods and evaluate their performance on the testing set directly. As we can see, our method outperforms the state-of-the-art methods in most metrics on both datasets, demonstrating the superiority of our model in generating high-quality person images. \paragraph{Qualitative Comparison.} Figure~\ref{qua_result} shows the qualitative comparison of different methods on the two datasets. All the results of state-of-the-art methods are obtained by directly running their pre-trained models released by authors. As we can see, for the challenging cases with large pose discrepancies (e.g., the first two rows on the left of Figure~\ref{qua_result}), the existing methods may produce results with heavy artifacts and appearance distortion. In contrast, for the DeepFashion dataset~\cite{liu2016deepfashion}, our model can generate realistic images in arbitrary target poses, which not only reconstructs the reasonable and consistent global appearances, but preserves the vivid local details such as the textures of clothes and hat. Especially, our model is able to produce more suitable appearance contents for target regions which are invisible in the source image such as the legs and backs of clothes (see the last three rows). For the Market-1501 dataset~\cite{zheng2015scalable}, our model yields natural-looking images with sharp appearance details whereas the artifacts and blurs can be observed in the results of other state-of-the-art methods. More results can be found in the supplementary material. \paragraph{User Study.} We perform a user study to judge the realness and preference of the images generated by different methods. For the realness, we recruit 30 participants to judge whether a given image is real or fake within a second. Following the setting of previous work~\cite{ma2017pose,siarohin2018deformable,zhu2019progressive}, for each method, 55 real images and 55 generated images are selected and shuffled randomly. Specifically, the first 10 images are used to warm up and the remaining 100 images are used to evaluate. For the preference, in each group of comparison, a source image, a target pose, and 5 result images generated by different methods are displayed to the participants, and the participants are asked to pick the most reasonable one w.r.t. both the source appearance and target pose. We enlist 30 participants to take part in the evaluation and each participant is asked to finish 30 groups of comparisons for each dataset. As shown in Table~\ref{table3}, our method outperforms the state-of-the-art methods in all subjective measurements on the two datasets, especially for the DeepFashion dataset~\cite{liu2016deepfashion} with higher resolution, verifying that the images generated by our model are more realistic and faithful. \begin{table}[h] \centering \resizebox{0.31\textwidth}{!}{ \begin{tabular}{@{}c|cccc@{}} \toprule \multirow{2}{*}{Model} & \multicolumn{2}{c|}{Market-1501} & \multicolumn{2}{c}{DeepFashion} \\ \cmidrule(l){2-5} & G2R$\uparrow$ & \multicolumn{1}{c|}{Prefer$\uparrow$} & G2R$\uparrow$ & Prefer$\uparrow$ \\ \midrule VU-Net & -\,- & 11.44 & -\,- & 1.00 \\ Def-GAN & 41.03 & 10.00 & 5.23 & 1.44 \\ PATN & 38.03 & 14.00 & 10.93 & 2.22 \\ DIST & 47.37 & 23.11 & 38.30 & 28.89 \\ Ours & \textbf{50.00} & \textbf{41.45} & \textbf{43.83} & \textbf{66.45} \\ \bottomrule \end{tabular} } \caption{User study($\%$). \textbf{G2R} means the percentage of generated images rated as real w.r.t. all generated images. \textbf{Prefer} denotes the user preference for the most realistic result among different methods.} \label{table3} \end{table} \subsection{Ablation Study} We further perform the ablation study to analyze the contribution of each technical component in our method. We first introduce the variants implemented by alternatively removing a corresponding component from our full model. \noindent \textbf{w/o the part-based decomposition (w/o Part).} This model removes the part-based decomposition in our flow generation module, and directly estimates the whole flow field of human body to warp the global source image features. \noindent \textbf{w/o the hybrid dilated convolution block (w/o HDCB).} This model removes the \textit{hybrid dilated convolution block} in our local warping module, and directly uses the selected part features to conduct the subsequent feature fusion. \noindent \textbf{w/o the pyramid non-local block (w/o PNB).} This model removes the \textit{pyramid non-local block} in our global fusion module, and simply takes the preliminary global fusion features as input to generate the final target images. \noindent \textbf{Full.} This represents our full model. Table~\ref{table4} shows the quantitative results of ablation study on the DeepFashion dataset~\cite{liu2016deepfashion}. We can see that, our full model achieves the best performance on all evaluation metrics except SSIM, and the removal of any components will degrade the performance of the model. \begin{table}[h] \centering \resizebox{0.32\textwidth}{!}{ \begin{tabular}{@{}c|cccc@{}} \toprule \multirow{2}{*}{Model} & \multicolumn{4}{c}{DeepFashion} \\ \cmidrule(l){2-5} & FID$\downarrow$ & LPIPS$\downarrow$ & SSIM$\uparrow$ & PSNR$\uparrow$ \\ \midrule w/o Part & 13.736 & 0.2090 & 0.716 & 17.420 \\ w/o PNB & 9.302 & 0.1832 & 0.728 & 17.945 \\ w/o HDCB & 9.326 & 0.1829 & \textbf{0.729} & 18.021 \\ Full & \textbf{8.755} & \textbf{0.1815} & 0.726 & \textbf{18.030} \\ \bottomrule \end{tabular} } \caption{The quantitative results of ablation study on the DeepFashion dataset. The best results are bolded.} \label{table4} \end{table} Qualitative comparison of different ablation models is demonstrated in Figure~\ref{aba}. We can see that, although the models w/o Part, w/o PNB, and w/o HDCB can generate target images with correct poses, they can't preserve the human appearances in source images very well. Specifically, there exists heavy appearance distortion on the results produced by the model w/o Part, because of the difficulty in directly learning the overall flow fields of human body under large pose discrepancies. The results generated by the model w/o PNB often suffer from the inconsistency in global human appearance since it doesn't explicitly consider the long-range semantic correlations across different human parts. Besides, the images produced by the model w/o HDCB may lose some local appearance details because it can't fully capture the short-range semantic correlations of local neighbors within a certain part. In contrast, our full model can reconstruct the most realistic images which not only possess consistent global appearance, but maintain vivid local details. \begin{figure}[h] \centering \includegraphics[width= 0.45\textwidth]{aba2.png} \caption{The qualitative comparison of ablation study.} \label{aba} \end{figure} \subsection{Visualization of The Relation Map} To illustrate the effectiveness of our \textit{pyramid non-local block} in capturing the global semantic correlations among different human parts, in Figure~\ref{vis} we visualize the generated relation map (e.g., size of $6\times6$), which represents the relation values of all patches w.r.t a certain target patch. As we can see, for a target patch in a certain image region (e.g., shirt, pants, background), the patches with similar semantics usually have larger relation values w.r.t. this target patch, indicating that our \textit{pyramid non-local block} can capture the non-local semantic correlations among different part regions effectively. \begin{figure}[!h] \centering \includegraphics[width= 0.45\textwidth]{vis.png} \caption{Visualization of the relation map w.r.t. a certain target patch marked by a red rectangle in the image.} \label{vis} \end{figure} \subsection{Person Image Generation in Random Poses} As shown in Figure~\ref{random_fashion}, given the same source person image and a set of target poses selected from the testing set randomly, our model is able to generate the target images with both vivid appearances and correct poses , demonstrating the versatility of our model sufficiently. \begin{figure}[h] \centering \includegraphics[width=0.46\textwidth]{random_pose.png} \caption{The results of generated person images in random target poses on the DeepFashion dataset.} \label{random_fashion} \end{figure} \section{Conclusion} We present a structure-aware appearance flow based approach to generate realistic person images conditioned on the source appearances and target poses. We decompose the task of learning the overall appearance flow field into learning different local flow fields for different human body parts, which can simplify the learning and model the pose change of each part more precisely. Besides, we carefully design different modules within our framework to capture the local and global semantic correlations of features inside and across human parts respectively. Both qualitative and quantitative results demonstrate the superiority of our proposed method over the state-of-the-art methods. Moreover, the results of ablation study and visualization verify the effectiveness of our designed modules. \section{Acknowledgments} This work is supported by the National Key R\&D Program of China (2018YFB1004300).
{ "redpajama_set_name": "RedPajamaArXiv" }
9,745
El país de Mai Més (del terme anglès Neverland) és una illa imaginària citada a la novel·la fantàstica de J. M. Barrie, Peter Pan. Aquest lloc és habitat pels nens perduts liderats per l'heroi infantil, Peter Pan. La població d'aquest país agrupa també temibles pirates com el Capità Garfi i salvatges indis. Altres tipus d'éssers com la fada, Campaneta i el Cocodril que es va menjar la mà del Capità Garfi habiten aquest lloc on tot sempre és diversió i els infants mai no creixen. D'acord amb la llegenda, si algú vol arribar a aquest lloc haurà girar a la segona estrella a la dreta, volant fins a la matinada. En el doblatge en català de la pel·lícula Hook (Steven Spielberg, 1991), Neverland rep el nom de País dels Somnis. Referències Illes fictícies Països imaginaris
{ "redpajama_set_name": "RedPajamaWikipedia" }
6,187
<div class="container content"> <iframe src="https://drive.google.com/file/d/0B6GDYlMCIMkkdld2UFc2NDR1NkU/preview" style="margin: 0 auto; width:100%; height:900px;" frameborder="1"></iframe> </div>
{ "redpajama_set_name": "RedPajamaGithub" }
50
package com.zimbra.cs.lmtpserver; import com.zimbra.common.service.ServiceException; import com.zimbra.common.util.Log; import com.zimbra.common.util.ZimbraLog; import com.zimbra.cs.server.ServerConfig; import com.zimbra.cs.util.BuildInfo; import com.zimbra.common.localconfig.LC; import com.zimbra.cs.util.Config; import static com.zimbra.cs.account.Provisioning.*; public class LmtpConfig extends ServerConfig { private final LmtpBackend lmtpBackend; private static final String PROTOCOL = "LMTP"; private static final int MAX_IDLE_TIME = 300; // seconds public static final LmtpConfig INSTANCE = new LmtpConfig(); public static LmtpConfig getInstance() { return INSTANCE; } private LmtpConfig() { super(PROTOCOL, false); lmtpBackend = new ZimbraLmtpBackend(this); } @Override public String getServerName() { return getAttr(A_zimbraLmtpAdvertisedName, LC.zimbra_server_hostname.value()); } @Override public String getServerVersion() { return getBooleanAttr(A_zimbraLmtpExposeVersionOnBanner, false) ? BuildInfo.VERSION : null; } @Override public int getMaxIdleTime() { return MAX_IDLE_TIME; } @Override public int getShutdownTimeout() { return getIntAttr(A_zimbraLmtpShutdownGraceSeconds, super.getShutdownTimeout()); } @Override public int getMaxThreads() { return getIntAttr(A_zimbraLmtpNumThreads, super.getMaxThreads()); } @Override public int getBindPort() { return getIntAttr(A_zimbraLmtpBindPort, Config.D_LMTP_BIND_PORT); } @Override public String getBindAddress() { return getAttr(A_zimbraLmtpBindAddress, null); } @Override public Log getLog() { return ZimbraLog.lmtp; } @Override public String getConnectionRejected() { return "421 " + getDescription() + " closing connection; service busy"; } public String getMtaRecipientDelimiter() { try { return getGlobalConfig().getAttr(A_zimbraMtaRecipientDelimiter); } catch (ServiceException e) { getLog().warn("Unable to get global attribute: " + A_zimbraMtaRecipientDelimiter, e); return null; } } public LmtpBackend getLmtpBackend() { return lmtpBackend; } public boolean isPermanentFailureWhenOverQuota() { return getBooleanAttr(A_zimbraLmtpPermanentFailureWhenOverQuota, false); } }
{ "redpajama_set_name": "RedPajamaGithub" }
6,742
{"url":"http:\/\/physics.stackexchange.com\/questions\/79447\/calculating-the-frictional-force","text":"# Calculating the frictional force\n\nHere's my problem and the work I've done. The time is already past for me to submit the answer, but I want to know where I went wrong and why I was wrong.\n\nThe 2-kg box slides down a vertical wall while you push on it at a 45 degree angle from below. Both the box and the wall are wood. What magnitude of force should you apply to cause the box to slide down at a constant speed?\n\nThe coefficient of kinetic friction for wood-wood is 0.2.\n\nThe vertical forces acting on the box are:\n\n$F_{box}$(sin 45) - $F_{friction} - mg$ = 0\n\nwhere\n\n$F_{box}$ = force acting on the box\n\n$F_{friction}$ = frictional force opposing the motion\n\n$m$ = mass of the box\n\n$g$ = acceleration due to gravity\n\nHence\n\n$F_{friction} = F_{box}$(sin 45) - $mg$ --- call this Equation 1\n\nThe normal force acting on the box is as follows:\n\n$F_{box}$(cos 45) = $F_n$\n\nand since\n\n$F_{friction}$ = \u00b5$F_n$, then\n\n$F_{friction}$ = \u00b5($F_{box}$)cos 45 --- call this Equation 2\n\nSetting Equation 1 = Equation 2,\n\n$F_{box}$(cos 45) - $mg$ = \u00b5($F_{box}$)cos 45\n\nSimplifying the above for \"$F_{box}$\"\n\n$F_{box}$(cos 45) - $F_{box}$(\u00b5*cos 45) = $mg$\n\n$F_{box}$(sin 45 - \u00b5cos 45) = $mg$\n\nand solving for \"$F_{box}$\"\n\n$F_{box}$ = $\\frac{mg}{cos 45 - \u00b5cos 45}$\n\nSubstituting appropriate values and calculating for \"$F_{box}$\"\n\n$F_{box}$ = 34.65N\n\nThe system says that the solution is 23N. How did they get that and where is my mistake?\n\n-\n\n$mg = F_{box}(sin 45) + F_{friction}$","date":"2015-10-09 10:47:20","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7393101453781128, \"perplexity\": 1034.6164776863998}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2015-40\/segments\/1443737927030.74\/warc\/CC-MAIN-20151001221847-00024-ip-10-137-6-227.ec2.internal.warc.gz\"}"}
null
null
Флоријан Ајдини је ромски глумац. Једина улога на филму му је у остварењу Емира Кустурице, Црна мачка бели мачор у којем игра Зарета Дестанова. Референце Спољашње везе Ромски глумци
{ "redpajama_set_name": "RedPajamaWikipedia" }
3,337
\section{Introduction} It is well-known that some stellar objects (e.g. neutron stars, anomalous X-ray pulsars), where nuclear matter are assumed to be under extreme conditions, possess large surface magnetic fields~\cite{Chakrabarty:1997ef}. Such strong fields are also found to be present in non-central heavy ion collisions (HIC), sourced by the fast-moving and positively-charged protons of the colliding nuclei. Sophisticated numerical simulations have demonstrated that the initial strength of this magnetic field can be very high, $eB\sim \hat{O}(1) m_\pi^2$ at RHIC and $eB\sim \hat{O}(10)m_\pi^2$ at LHC \cite{Skokov:2009qp,Deng:2012pc,Bloczynski:2012en,Tuchin:2014iua,bzdak,McLerran}, and that on average it points in the direction perpendicular to the reaction plane. The presence of the strong and anisotropic magnetic field in the non-central HICs could potentially induce observable effects in these collisions. For example, the magnetic field could lead to novel transport phenomena such as the chiral magnetic effect~\cite{cme1,cme2,cme3}, chiral magnetic wave~\cite{Burnier:2011bf} as well as charge-dependent directed flow~\cite{Gursoy:2014aka,Gursoy:2018yai,Das:2016cwd,Dubla:2020bdz}. The influence of strong magnetic fields on the photon and dilepton productions from quark-gluon plasma have also been studied extensively~\cite{Basar:2012bp,Ayala:2016lvs,Wang:2020dsr,Tuchin:2013bda,Sadooghi:2016jyf,Bandyopadhyay:2016fyd,Bandyopadhyay:2017raf,Ghosh:2018xhh,Islam:2018sog,Das:2019nzv}, which may possibly help explain the observed large anisotropy of photon emissions by PHENIX~\cite{phenix}. Such a strong magnetic field, introducing an extra scale in the quark-gluon plasma (QGP) in addition to the usual temperature and chemical potential, has also triggered significant interest in theoretically understanding the phase structures and properties of a strongly magnetized medium. For example, there have been a lot of studies on the finite temperature magnetic catalysis (MC)~\cite{mcat1,mcat2,mcat3}, the inverse magnetic catalysis (IMC)~\cite{Bali,Farias:2014eca,Farias:2016gmy,Mueller:2015fka,Ayala:2014iba,Ayala:2014gwa,Ayala:2015bgv}, as well as other thermodynamic properties~\cite{Ding:2020hxw,Ding:2021cwv}. For various developments along these directions, see recent reviews in e.g.~\cite{Kharzeev:2012ph,Shovkovy,Elia,Fukushima,Mueller, Miransky,Kharzeev:2015znc,Kharzeev:2020jxw,Fukushima:2018grm,Li:2020dwr,Liu:2020ymh,Gao:2020vbh,Bandyopadhyay:2020zte,Andersen:2014xxa,Andersen:2021lnk}. The dynamical evolution of heavy quarks (HQ) serves as an important probe for the properties of strongly interacting hot quark-gluon plasma created in heavy ion collisions. Because of their large mass compared to the temperature scale, HQs are generated at the early stage of the initial hard scatterings and are ``external'' to the bulk thermal medium. These heavy quarks traverse through the fireball and experience drag forces as well as random ``kicks'' from the thermal partons in the bulk medium. A widely adopted approach to describe such HQ dynamics is to use the Langevin equations for describing HQ in-medium evolution. The essential theoretical inputs needed for this approach include the HQ momentum drag and diffusion coefficients. These parameters are known to sensitively influence the phenomenological modelings of HQ dynamics and the predictions for experimental observables~\cite{Rapp:2018qla}. Many efforts have been made to compute these HQ transport coefficients in the quark-gluon plasma. A number of results were obtained when the heavy quarks are considered to be static with its much heavier mass as the highest scale of the system~\cite{CaronHuot:2007gq,CaronHuot:2008uh,Singh:2018wps}, known as the static limit of the HQ. These computations typically employ the Hard Thermal Loop (HTL) resummation method for the hot medium~\cite{Braaten:1991jj,Braaten:1991we,Thoma:1990fm,Moore:2004tg,Beraudo:2009pe,Monteno:2011gq}. Though it is easier to work within the static limit, which is a valid approximation for low-momentum charm and bottom quarks, there is the strong need for going beyond the static limit, given that current HIC measurements for heavy flavor sector extend well into high momentum region where the transverse momentum scale could be much larger than the charm or bottom quark masses. The presence of strong magnetic field brings interesting new questions about HQ dynamics, namely the magnetic field effect on the HQ transport coefficients in a highly magnetized quark-gluon plasma. There have been some recent developments on the HQ dynamics both within and beyond the static limit ~\cite{Fukushima:2015wck,Kurian:2019nna,Singh:2020faa,Singh:2020fsj}. Most of those calculations consider the Lowest-Landau-Level (LLL) approximation, which for a thermal medium suggests the regime $eB \gg T^2$. On top of that, the HQ mass ($M$) is assumed to be the largest scale of the system, resulting in the scale hierarchy $M\gg eB/T \gg T$. In Ref~\cite{Fukushima:2015wck}, the authors have also specified a further constraint $\alpha_s eB \ll T^2$, $\alpha_s$ being the strong coupling, such that one can neglect the soft self energy corrections of the LLL quarks and gluons while evaluating the scattering rate. The presence of an external magnetic field pointing at a fixed direction also breaks isotropy of the system, therefore even within the static limit of HQ, there will be two momentum diffusion coefficients, i.e. in the longitudinal and transverse directions of the magnetic field. Going beyond the static limit, there will be nontrivial interplay between the magnetic field direction and the HQ momentum direction, making the problem even more complex and challenging. Clearly, a lot more need to be understood for HQ transport coefficients in a magnetized quark-gluon plasma. In this paper, we aim to address this important problem, namely the calculation of the heavy quark transport coefficients beyond the static limit in a quark-gluon plasma under the presence of a strong external magnetic field. Considering a HQ moving with a velocity $\vec{v}$ in presence of an anisotropic $\vec{B} = B \hat{z}$, we analytically derive the full results for the longitudinal and transverse momentum diffusion coefficients as well as the energy losses for charm and bottom quarks. We will adopt the the Lowest Landau Level (LLL) approximation for medium quark propagators in the regime $M\gg eB/T \gg T$ and use the HTL technique for the resummed effective gluon propagators generalized for a hot and magnetized medium. We also show numerical results for these coefficients in two special cases where the heavy quark is moving either parallel or perpendicular to the external magnetic field ($\vec{v} \shortparallel \vec{B}$ and $\vec{v} \perp \vec{B}$). The rest of this paper is organized as follows. In section \ref{sec2} we discuss the basic formalism required to study the HQ dynamics, both for $B=0$ and $B \neq 0$, within and beyond the static limit. In the following section (section \ref{sec3}) we compute the scattering rate for both $B=0$ and $B\neq 0$ beyond the static limit. In section \ref{sec4} we evaluate the final expressions for the energy loss and the momentum diffusion coefficients for HQ in a strongly magnetized medium for both $\vec{v} \shortparallel \vec{B}$ and $\vec{v}\perp\vec{B}$. Section \ref{sec5} contains our results and corresponding discussions. Finally we summarize and conclude in section \ref{sec6}. \section{Formalism} \label{sec2} In the present work we focus on the HQ dynamics, where the HQ is assumed to be relativistic (i.e. beyond the static limit) in presence of a hot and magnetized medium. We will start the current section by discussing the $B=0$ case and gradually move in to the $B\neq 0$ cases, within and beyond the static limit. \subsection{HQ dynamics without magnetic field} In absence of the external magnetic field, there is only one external scale from heavy quarks, i.e. $(M, p) \gg T$. Because of the fact that it takes many collisions to substantially change the momentum of the HQ, the interaction of the HQ with the medium can be approximated as uncorrelated momentum kicks. For the relatively simple non-relativistic case, we can consider the HQ to be static, i.e. vanishing $p$. The corresponding dynamics follows the Langevin equation as \begin{equation} \frac{dp_i}{dt} = \xi_i(t) - \eta_D p_i, ~\langle \xi_i(t)\xi_j(t^\prime)\rangle = \kappa\delta_{ij}\delta(t-t^\prime), \label{langevin1} \end{equation} where $(i,j)=(x,y,z)$ and $\xi_i(t)$ represents the uncorrelated momentum kicks. $\eta_D$ and $\kappa$ are respectively known as the momentum drag and diffusion coefficient. Assuming $t>\eta_D^{-1}$, the solution of the above differential equation can be given as \begin{equation} p_i(t) = \int\limits_{-\infty}^t dt^\prime e^{\eta_D(t^\prime-t)} \xi_i(t^\prime), \end{equation} and the mean squared value of $p$ is expresed as \begin{equation} \langle p^2 \rangle = \int dt_1dt_2e^{\eta_D(t_1+t_2)}\langle \xi_i(t_1)\xi_i(t_2)\rangle = \frac{3\kappa}{2\eta_D}, \end{equation} where $3\kappa$ is the mean squared momentum transfer per unit time (factor 3 coming from the 3 isotropic spatial dimensions). However, in high energy collisions, the charm and bottom quark spectra suggests a very large transverse momenta. Hence the relativistic case becomes realistically more important to study. For this case, we consider HQ with velocity $\gamma v \approx 1$, with $v = p/p_0$. So it takes around $p/T$ collisions to change the momentum of the HQ by a factor of 1. Now, considering the HQ is moving in a particular direction, we have the modified Langevin equation as \begin{eqnarray} \frac{dp_i}{dt} = \xi_i(t) - \eta_D(p) p_i, \langle \xi_i(t)\xi_j(t^\prime)\rangle = \kappa_{ij}(\vec p)\delta(t-t^\prime), \label{langevin2} \end{eqnarray} where \begin{eqnarray} \kappa_{ij}({\vec{p}}) = \kappa_L(p)~ \hat{p}_i\hat{p}_j + \kappa_T(p) \left( \delta_{ij}-\hat{p}_i\hat{p}_j\right), \end{eqnarray} where $\hat{p}_i$ is the HQ momentum unit vector along specific direction $i$ with $(i,j) = (x,y,z)$. $\kappa_L$ and $\kappa_T$ are the longitudinal and transverse momentum diffusion coefficients respectively. Comparing with the non-relativistic case we can see that the anisotropy generated from the movement of HQ in a preferred direction subsequently breaks down $\kappa$ into longitudinal and transverse parts, i.e. $3\kappa \equiv \kappa_L + 2\kappa_T$. Again in terms of the mean sqaured momentum values $\kappa_{ij}$ can be expressed as \begin{eqnarray} \kappa_{ij}({\vec{p}}) = \lim_{\Delta t\rightarrow 0} \frac{\langle \Delta p_i \Delta p_j\rangle}{\Delta t}, \end{eqnarray} with $\Delta p_i = p_i(t+\Delta t) - p_i(t)$. This in turn leads to the following macroscopic equations of motion \begin{subequations} \begin{eqnarray} \frac{d}{dt}\langle p \rangle &\equiv& -\eta_D(p) p , \\ \frac{1}{2}\frac{d}{dt} \langle (\Delta p_T)^2\rangle &\equiv& \kappa_T(p), \\ \frac{d}{dt} \langle (\Delta p_L)^2\rangle &\equiv& \kappa_L(p), \end{eqnarray} \end{subequations} with $p_L$ and $p_T$ representing longitudinal and transverse momentum components. At finite temperature, the uncorrelated momentum kicks can be thought of generated from the scattering process of thermally populated light quarks and gluons with the heavy quark, i.e. $2\leftrightarrow 2$ scattering processes $qH\rightarrow qH$ and $gH\rightarrow gH$ ($q \rightarrow$ quark, $g\rightarrow$ gluon and $H\rightarrow$ HQ). At Leading Order in strong coupling, these scatterings are mediated by one-gluon exchange (see Fig.~\ref{hq_sqme_alt}), and the scattering particles can be considered as quasiparticles in thermally equilibrated matter. In the rest frame of the plasma, the Compton scattering is suppressed by the scale $T/M$ and hence both the $qH\rightarrow qH$ and $gH\rightarrow gH$ processes predominantly occurs only by $t$-channel gluon exchange. Hence all the transport coefficients, i.e. $\eta_D, \kappa_L, \kappa_T$ are directly related to the scattering/interaction rate $\Gamma$ of the t-channel gluon exchange and can be expressed as \begin{subequations} \begin{eqnarray} \frac{dp}{dt} &=& \frac{1}{v} \int d^3q ~\frac{d\Gamma}{d^3q} ~q_0, \\ \kappa_L &=& \int d^3q~\frac{d\Gamma}{d^3q} ~q_L^2, \\ \kappa_T &=& \frac{1}{2}\int d^3q ~\frac{d\Gamma}{d^3q} ~q_T^2. \end{eqnarray} \end{subequations} In the following subsections we discuss about the modification of these coefficients in presence of an external magnetic field. \subsection{HQ dynamics with finite magnetic field} Initial arguments in support of the Langevin picture to describe HQ dynamics in the magnetized medium is similar to that of the previous section. In presence of an external magnetic field the heavy quark mass is considered to be sufficiently large, i.e. $M\gg eB/T$. The value of the external magnetic field $eB$ will determine the further scale hierarchies, e.g. $M \gg eB/T \gg T$ for the Lowest Landau Level dynamics. However, because of the spatial anisotropy introduced by the external magnetic field, we will have a set of two equations for the longitudinal ($z/\shortparallel$) and transverse ($\perp$) momenta \begin{subequations} \begin{eqnarray} \frac{dp_z}{dt} &=& -\eta_\shortparallel p_z +\xi_z, ~~\langle \xi_z(t)\xi_z(t^\prime)\rangle = \kappa_\shortparallel\delta(t-t^\prime), \\ \frac{d\vec p_\perp}{dt} &=& -\eta_\perp \vec p_\perp +\vec\xi_\perp, ~~\langle \xi_\perp^i(t)\xi_\perp^j(t^\prime)\rangle = \kappa_\perp\delta_{ij}\delta(t-t^\prime), \end{eqnarray} \end{subequations} where $(i,j =x,y) $ and $\vec A_\perp =(A_x,A_y)$ are the transverse components of the momenta, random forces and drag coefficients. Consequently, the drag and diffusion coefficients are correlated \begin{eqnarray} \eta_\shortparallel &=& \frac{\kappa_\shortparallel}{2MT}, ~~ \eta_\perp = \frac{\kappa_\perp}{2MT}. \end{eqnarray} Moreover, similarly as the relativistic case at $B=0$, for the magnetized medium also, within the static limit we can break down $\kappa$ into longitudinal and transverse parts using the rotational symmetry \begin{eqnarray} 3\kappa = \kappa_\shortparallel + 2\kappa_\perp, \end{eqnarray} with \begin{subequations} \begin{align} &\kappa_\shortparallel = \int d^3q\frac{d~\Gamma(E)}{d^3q}q_\shortparallel^2, \label{msmt_wr_long}\\ &\kappa_\perp = \frac{1}{2}\int d^3q\frac{d~\Gamma(E)}{d^3q}q_\perp^2, \label{msmt_wr_tran} \end{align} \end{subequations} where $\frac{d\Gamma(E)}{d^3q}$ can be interpreted as the scattering rate of the HQ via one-gluon exchange with thermal particles per unit volume of momentum transfer $q$. On the other hand beyond the static limit we have the finite velocity $\vec{v} = \vec{p}/E$. Now we have to consider the direction of $\vec{v}$ in the context. \subsubsection{case 1: $\vec{v} \shortparallel \vec{B}$} This case is simpler since the magnetic field and the heavy quark are considered to be moving in the same direction, i.e. $z$ direction for our case. So the macroscopic equations of motion for this case can be given as \begin{subequations} \begin{align} \frac{d}{dt}\langle p \rangle \equiv & -\eta_D(p) p, \\ \frac{1}{2}\frac{d}{dt}\langle (\Delta p_T)^2\rangle \equiv& \kappa_T (p), \\ \frac{d}{dt}\langle (\Delta p_z)^2\rangle \equiv& \kappa_L (p), \end{align} \end{subequations} where $\Delta$ signifies the respective variance of the momentum distributions with the transport coefficients. The HQ energy loss, transverse and longitudinal momentum diffusion coefficients are given as \begin{subequations} \label{coeffs_case1} \begin{align} \frac{dE}{dx} =& \frac{1}{v}\int d^3q\frac{d~\Gamma(v)}{d^3q}q_0, \\ \kappa_T (p) =& \frac{1}{2}\int d^3q\frac{d~\Gamma(v)}{d^3q}q_\perp^2, \\ \kappa_L (p) =& \int d^3q\frac{d~\Gamma(v)}{d^3q}q_z^2. \end{align} \end{subequations} \subsubsection{case 2 : $\vec{v} \perp \vec{B}$} In this situation as the HQ moves perpendicular to (i.e. $x$ or $y$) the direction of the external anisotropic magnetic field (i.e. $z$), we have three momentum diffusion coefficients (i.e. $\kappa_1, \kappa_2, \kappa_3$) in our hand, \begin{subequations} \begin{align} &\frac{d}{dt}\langle (\Delta p_x)^2\rangle \equiv \kappa_1 (p),\\ &\frac{d}{dt}\langle (\Delta p_y)^2\rangle \equiv \kappa_2 (p), \\ &\frac{d}{dt}\langle (\Delta p_z)^2\rangle \equiv \kappa_3 (p), \end{align} \end{subequations} which are explicitly given as \begin{subequations} \label{coeffs_case2} \begin{align} &\kappa_1 (p) = \int d^3q\frac{d~\Gamma(v)}{d^3q}q_x^2, \\ &\kappa_2 (p) = \int d^3q\frac{d~\Gamma(v)}{d^3q}q_y^2, \\ &\kappa_3 (p) = \int d^3q\frac{d~\Gamma(v)}{d^3q}q_z^2. \end{align} \end{subequations} \section{Computation of the Scattering rate ($\Gamma$)} \label{sec3} \begin{figure*} \begin{center} \includegraphics[scale=0.6]{hq_alt.pdf} \caption{The equivalence of the $t$-channel scattering of heavy quarks due to thermally generated light quarks and gluons, $qH\rightarrow qH$ (left) and $gH\rightarrow gH$ (right) are shown, as they can also be expressed as the cut (imaginary) part of the HQ self energy.} \label{hq_sqme_alt} \end{center} \end{figure*} An effective way of expressing the scattering rate, as proposed by Weldon~\cite{Weldon:1983jn} and demonstrated in Fig. \ref{hq_sqme_alt}, is in terms of the cut/imaginary part of the HQ self energy $\Sigma(P)$, \begin{align} &\Gamma(P\equiv E,{\bf v}) = -\frac{1}{2E}~\frac{1}{1+e^{-E/T}}~\Tr\left[(\slashed{P}+M)~{\rm Im}\Sigma(p_0+i\epsilon,{\vec{p}})\right]. \label{interaction_rate2} \end{align} The advantage of Eq.(\ref{interaction_rate2}) is that one can apply imaginary time formalism of thermal field theory to extract $\Sigma(P)$ including the necessary resummations as we will see soon. Now, though the hard contribution of $\Gamma(P)$ comes from cutting the two-loop self energy diagrams shown in Fig. \ref{hq_sqme_alt}, but to include the soft contributions, i.e. where the momentum $Q$ flowing through the gluon line is soft, hard thermal loop corrections to the gluon propagator contribute at leading order in $g$ and resummation must be taken into account. So, instead of two separate processes (i.e. $qH\rightarrow qH$ and $gH\rightarrow gH$) depicted in Fig.~\ref{hq_sqme_alt}, we will have an effective gluon propagator which is obtained by summing the geometric series of one-loop self energy corrections proportional to $g^2T^2$ (see Fig.~\ref{hq_htl}). \begin{figure} \begin{center} \includegraphics[scale=0.6]{hq_htl.pdf} \caption{Heavy quark self-energy with effective gluon propagator. Resummation takes into account the diagrams for the hard process (same as Fig.\ref{hq_sqme_alt}) among others. } \label{hq_htl} \end{center} \end{figure} \subsection{Scattering rate without magnetic field} For $B=0$, the effective self-energy for the HQ is given by \begin{align} \Sigma(P) &= ig^2 \int \frac{d^4Q}{(2\pi)^4}G^{\mu\nu}(Q) \gamma_\mu\frac{1}{\slashed{P}-\slashed{Q}-M}\gamma_\nu \nonumber\\ &= -g^2T \sum_{q_0}\int \frac{d^3q}{(2\pi)^3}G^{\mu\nu}(q_0,\vec{q}) \gamma_\mu\frac{1}{\slashed{P}-\slashed{Q}-M}\gamma_\nu, \end{align} where $Q\equiv (q_0,\vec{q})$ is the gluonic four-momenta and $G^{\mu\nu}(Q)$ is the HTL gluon propagator in Coulomb gauge, given as \begin{eqnarray} G^{\mu\alpha}(Q) = -\frac{\delta^{\mu 0}\delta^{\alpha 0}}{q^2+\Pi_L} + \frac{\delta^{ij}-\hat{q}^i\hat{q}^j}{q^2-q_0^2+\Pi_T}. \label{t_gp} \end{eqnarray} The first term of Eq. (\ref{t_gp}) represents the temporal part of the gluon propagator $G^{00}$ (i.e. it would vanish for $\mu,\alpha \neq 0$) whereas $(i,j)$ in the second term symbolize the spatial components. $\Pi_L$ and $\Pi_T$ are respectively the longitudinal and transverse coefficients of the HTL gluon self-energies ($\Pi_L$ is also equivalent to the temporal component $\Pi_{00}$ of the HTL gluon self energy $\Pi_{\mu\nu}$), given as \begin{subequations} \begin{align} &\Pi_L = \Pi_{00} = m_D^2 \left\{1-\frac{q_0}{2q}\left[\ln\left(\frac{q+q_0}{q-q_0}\right)-i\pi\right] \right\}, \\ &\Pi_T = m_D^2 \left\{\frac{q_0^2}{2q^2}+\frac{q_0(q^2-q_0^2)}{4q^3}\left[\ln\left(\frac{q+q_0}{q-q_0}\right)-i\pi\right] \right\}, \end{align} \end{subequations} with $m_D$ being the Debye screening mass. Now, evaluation of the trace in Eq. (\ref{interaction_rate2}) yields \begin{align} \Tr\left[(\slashed{P}+M)\Sigma(P)\right] =& -4g^2T\sum_{q_0}\int \frac{d^3q}{(2\pi)^3} \frac{1}{(P-Q)^2-M^2} \Biggl[G_L(Q)\left(p_0^2+p^2-p_0q_0 \right. \nonumber\\ & \left. - \vec{p}\cdot \vec{q}+M^2\right) + 2G_T(Q)\left(p_0^2-p_0q_0+\vec{p}\cdot \vec{q}-( \vec{p}\cdot\hat{q})^2-M^2\right)\Biggr], \label{tr_zB_ir} \end{align} where $G_L$ and $G_T$ are defined as \begin{eqnarray} G_L^{-1} &=& q^2 + \Pi_L, \nonumber\\ G_T^{-1} &=& q_0^2 -q^2 - \Pi_T. \nonumber \end{eqnarray} To perform the Matsubara sum, the most efficient way is to use the spectral representations~\cite{Pisarski:1987wc} for the fermionic propagators ($P-Q \equiv K$) and the gluonic form factors. Spectral representation of the fermion propagator can be expressed as \begin{align} \frac{1}{K^2-M^2} =& \frac{1}{k_0^2-E'^2} \nonumber\\ =& \frac{-1}{2E'}\int\limits_0^{1/T} d\tau'e^{k_0\tau'}\left[n_F(-E')e^{-E'\tau'} -n_F(E')e^{E'\tau'}\right], \label{spectral_fp} \end{align} with $E' = \sqrt{M^2+(\vec{p}-\vec{q})^2}$. Similar procedure for the gluonic form factors yields \begin{align} G_{L/T} (Q) = -\int\limits_0^{1/T} \! d\tau e^{q_0\tau} \!\! \int\limits_{-\infty}^{+\infty}\!\! d\omega \rho_{L/T}(\omega,q)[1+n_B(\omega)]e^{-\omega \tau}, \label{spectral_gff} \end{align} where $\rho_{L/T}$ are the spectral functions defined as $\rho_{L/T}(\omega,q) = -{\rm Im}G_{L/T}(q_0+i\epsilon,q)/\pi$. Next, combining Eqs.~(\ref{spectral_fp}) and (\ref{spectral_gff}) in Eq.~(\ref{tr_zB_ir}), evaluating the $\tau,\tau'$ integrals and extracting the imaginary part using the standard formula \begin{eqnarray} {\rm Im}\left(\frac{1}{p_0+i\epsilon \mp p}\right) = -i\pi \delta(p_0\mp p), \end{eqnarray} one can finally obtain \begin{eqnarray} &&\Tr\left[(\slashed{P}+M)~{\rm Im}\Sigma(P)\right] \nonumber\\ =&& -4\pi g^2 (1+e^{-p_0/T})\int\frac{d^3q}{(2\pi)^3}\int\limits_{-\infty}^{+\infty}d\omega~[1+n_B(\omega)]\nonumber\\ &&\times\frac{1}{2E'}\left\{ [1-n_F(E')]\delta(p_0-E'-\omega)-n_F(E')\delta(p_0+E'-\omega)\right\}\nonumber\\ &&\times \Bigl[ \rho_L(\omega,q) (2p_0^2-p_0\omega-\vec{p}\cdot\vec{q})+2\rho_T(\omega,q)(p^2-p_0\omega+\vec{p}\cdot\vec{q}-(\vec{p}\cdot\hat{q})^2)\Bigr]. \end{eqnarray} Next we can simplify the above expression using the assumptions $M,p\gg T$. So, the second $\delta$ function vanishes as $\omega \approx T$. The exponentially suppressed Fermi-Dirac distribution can also be dropped. Using $E' \simeq p_0- \vec{v}\cdot\vec{q}$, the first $\delta$ function becomes $\delta(\omega -\vec{v}\cdot\vec{q})$. Eventually the expression can be written as \begin{eqnarray} \Tr\left[(\slashed{P}+M)~{\rm Im}\Sigma(P)\right] =&& -4\pi g^2 (1+e^{-p_0/T})\int\frac{d^3q}{(2\pi)^3}\int\limits_{-\infty}^{+\infty}d\omega~[1+n_B(\omega)]\frac{1}{2p_0}\delta(\omega -\vec{v}\cdot\vec{q})\nonumber\\ &&\times \Bigl[ \rho_L(\omega,q) (2p_0^2)+2\rho_T(\omega,q)(p^2-(\vec{p}\cdot\hat{q})^2)\Bigr], \end{eqnarray} which gives the expression for the scattering rate from Eq.(\ref{interaction_rate2}) as~\cite{Braaten:1991jj,Beraudo:2009pe} \begin{eqnarray} \Gamma(P)= 2\pi g^2 \!\!\int\!\!\!\frac{d^3q}{(2\pi)^3}\!\!\int\limits_{-\infty}^{+\infty}\!\!d\omega[1+n_B(\omega)]\delta(\omega -\vec{v}\cdot\vec{q})\left[ \rho_L(\omega,q)+\rho_T(\omega,q)(v^2-(\vec{v}\cdot\hat{q})^2)\right]. \end{eqnarray} \subsection{Scattering rate with finite magnetic field} The effective heavy quark self energy in a magnetized medium is given by, \begin{eqnarray} \Sigma(P) = ig^2\int\frac{d^4Q}{(2\pi)^4}\mathcal{D}^{\mu\nu}(Q)\gamma_\mu S_m^s(P-Q)\gamma_\nu. \end{eqnarray} In this equation, the fermion propagator in the LLL approximation $S_m^s(P-Q\equiv K)$ is given by, \begin{eqnarray} iS^s_{m}(K)=ie^{-{k_\perp^2}/{|q_fB|}}~~\frac{\slashed{K}_\shortparallel+M}{ K_\shortparallel^2-M^2}(1-i\gamma_1\gamma_2), \label{prop_sfa} \end{eqnarray} where $q_f$ is the fermionic charge for a particular flavor $f$ and $K\equiv (K_\shortparallel,k_\perp)$ is the fermionic four momentum (Details about these $\shortparallel$ and $\perp$ notation can be found in Appendix \ref{appA}). In strong field approximation or in LLL, $eB \gg k_\perp^2$, an effective dimensional reduction from $(3+1)$ to $(1+1)$ takes place. On the other hand the effective gluon propagator in a hot and magnetized medium is given by~\cite{Karmakar:2018aig}, \begin{align} \mathcal{D}^{\mu\nu}(Q)=&\frac{\xi Q^{\mu}Q^{\nu}}{Q^4}+\frac{(Q^2-d_3) \Delta_1^{\mu\nu}}{(Q^2-d_1)(Q^2-d_3)-d_4^2}+\frac{\Delta_2^{\mu\nu}}{Q^2-d_2}\nonumber\\ &+\frac{(Q^2-d_1) \Delta_3^{\mu\nu}}{(Q^2-d_1)(Q^2-d_3)-d_4^2} +\frac{d_4 \Delta_4^{\mu\nu}}{(Q^2-d_1)(Q^2-d_3)-d_4^2}, \label{gauge_prop} \end{align} with \begin{subequations} \begin{align} d_1(Q) &= \Delta_1^{\mu\nu}\Pi_{\mu\nu}(Q), \label{ff_d1} \\ d_2(Q) &= \Delta_2^{\mu\nu}\Pi_{\mu\nu}(Q), \label{ff_d2} \\ d_3(Q) &= \Delta_3^{\mu\nu}\Pi_{\mu\nu}(Q), \label{ff_d3} \\ d_4(Q) &= \frac{1}{2}\Delta_4^{\mu\nu}\Pi_{\mu\nu}(Q) \label{ff_d4}, \end{align} \end{subequations} and \begin{subequations} \begin{align} \Delta_1^{\mu\nu} &= \frac{1}{\bar{u}^2} \bar{u}^\mu\bar{u}^\nu, \label{D1munu}\\ \Delta_2^{\mu\nu} &=g_{\perp}^{\mu\nu}-\frac{Q^{\mu}_{\perp}Q^{\nu}_{\perp}}{Q_{\perp}^2}, \label{D2munu}\\ \Delta_3^{\mu\nu} &= \frac{{\bar n}^\mu {\bar n}^\nu}{\bar n^2}, \label{D3munu}\\ \Delta_4^{\mu\nu} &= \frac{\bar u^{\mu}\bar n^{\nu}+\bar u^{\nu}\bar n^{\mu}}{\sqrt{\bar u^2}\sqrt{\bar n^2}}, \end{align} \end{subequations} where $u^\mu$ is the heat bath velocity and $n^\mu$ is defined uniquely as the projection of the electromagnetic field tensor $F^{\mu\nu}$ along $u^\mu$. Details about the construction of the tensor structure and the notations of $\bar{u}^\mu, \bar{n}^\nu, g_\perp^{\mu\nu}$ etc. are given in Appendix \ref{appA}. $\Pi_{\mu\nu}(Q)$ is the HTL gluon self energy in a strongly magnetized hot medium which is a combination of the Yang-Mills contribution $\Pi^g_{\mu\nu}$ and fermionic loop contribution $\Pi^s_{\mu\nu}$ within LLL approximation. The expressions for $\Pi^s_{\mu\nu}$, $\Pi^g_{\mu\nu}$ and the evaluation of $d_i(Q)$'s within the LLL approximation are given in Appendix \ref{appB}. Next we evaluate the trace required for the scattering rate, i.e. \begin{align} \Tr\left[(\slashed{P}+M)~\Sigma(P)\right] =& ig^2\int\frac{d^4Q}{(2\pi)^4} \frac{e^{-{k_\perp^2}/{|q_fB|}}}{K_\shortparallel^2-M^2} \nonumber\\ &\times\sum\limits_{i=1}^4\mathcal{J}_i~\Tr\left[(\slashed{P}+M)\Delta_i^{\mu\nu}\gamma_\mu (\slashed{K}_\shortparallel+M)(1-i\gamma_1\gamma_2)\gamma_\nu\right], \end{align} where we are working in a gauge with vanishing gauge parameters. The coefficients $\mathcal{J}_i$'s are given as, \begin{subequations} \begin{align} \mathcal{J}_1 &= \frac{(Q^2-d_3)}{(Q^2-d_1)(Q^2-d_3)-d_4^2}, \\ \mathcal{J}_2 &= \frac{1}{(Q^2-d_2)}, \\ \mathcal{J}_3 &=\frac{(Q^2-d_1)}{(Q^2-d_1)(Q^2-d_3)-d_4^2}, \\ \mathcal{J}_4 &= \frac{d_4}{(Q^2-d_1)(Q^2-d_3)-d_4^2}. \end{align} \label{mathcaljs} \end{subequations} We can now evaluate the individual traces as \begin{subequations} \begin{align} &\Tr\left[(\slashed{P}+M)\Delta_1^{\mu\nu}\gamma_\mu(\slashed{K}_\shortparallel+M)(1-i\gamma_1\gamma_2)\gamma_\nu\right]\nonumber\\ =& \frac{4}{\bar{u}^2} \left[2(\bar{u}\cdot K)_\shortparallel (\bar{u}\cdot P)-\bar{u}^2\left((K\cdot P)_\shortparallel-M^2\right)\right]\nonumber\\ =& \frac{4}{\bar{u}^2} \Bigl[2\left(p_0 - q_0 \left(1+\frac{(P\cdot Q)_\shortparallel-Q_\shortparallel^2}{Q^2}\right)\right) \nonumber\\ &\times\left(p_0-q_0\frac{P\cdot Q}{Q^2}\right)+\bar{u}^2\left(M^2 - P_\shortparallel^2 - p_3q_3 + p_0q_0\right)\Bigr]\nonumber\\ =&A_1 + q_0 B_1, \end{align} where \begin{equation} A_1 = \frac{4}{\bar{u}^2} \Bigl[2p_0^2+\bar{u}^2\left(M^2 - P_\shortparallel^2 - p_3q_3\right)\Bigr] \label{A1_final} \end{equation} and $B_1$ represents rest of the $q_0$ dependent terms. \begin{align} \Tr\left[(\slashed{P}+M)\Delta_2^{\mu\nu}\gamma_\mu(\slashed{K}_\shortparallel+M)(1-i\gamma_1\gamma_2)\gamma_\nu\right] =& -4 (K\cdot P)_\shortparallel + 4M^2\nonumber\\ =& 4\left(M^2 - P_\shortparallel^2 - p_3q_3 + p_0q_0\right)\nonumber\\ =& A_2 + q_0 B_2, \end{align} with \begin{equation} A_2 = 4\left(M^2 - P_\shortparallel^2 - p_3q_3\right) \label{A2_final} \end{equation} and $B_2$ represents rest of the $q_0$ dependent term. \begin{align} &\Tr\left[(\slashed{P}+M)\Delta_3^{\mu\nu}\gamma_\mu(\slashed{K}_\shortparallel+M)(1-i\gamma_1\gamma_2)\gamma_\nu\right]\nonumber\\ =& \frac{4}{\bar{n}^2} \left[2(\bar{n}\cdot K)_\shortparallel (\bar{n}\cdot P)-\bar{n}^2\left((K\cdot P)_\shortparallel-M^2\right)\right]\nonumber\\ =& \frac{4}{\bar{n}^2} \Bigl[2\left(-k_3+\frac{q_0q_3k_0}{q^2}-\frac{q_3}{q^2}((P\cdot Q)_\shortparallel-Q_\shortparallel^2)\right)\nonumber\\ & \times\left(-p_3+\frac{q_0q_3p_0}{q^2}-\frac{q_3}{q^2}(P\cdot Q)\right)+\bar{n}^2\left(M^2 - P_\shortparallel^2 - p_3q_3 + p_0q_0\right)\Bigr]\nonumber\\ =&A_3 + q_0 B_3, \end{align} with \begin{align} A_3 &= 4\Bigl[\frac{2k_3q_3}{q^2}(\vec{p}\cdot\vec{q})+M^2 - p_0^2- p_3k_3\Bigr] \label{A3_final} \end{align} and $B_3$ represents rest of the $q_0$ dependent terms. \begin{align} &\Tr\left[(\slashed{P}+M)\Delta_4^{\mu\nu}\gamma_\mu(\slashed{K}_\shortparallel+M)(1-i\gamma_1\gamma_2)\gamma_\nu\right]\nonumber\\ =& \frac{4}{\sqrt{\bar{u}^2}\sqrt{\bar{n}^2}} \big[(\bar{u}\cdot K)_\shortparallel (\bar{n}\cdot P)+(\bar{n}\cdot K)_\shortparallel (\bar{u}\cdot P)-2(\bar{n}\cdot\bar{u})\left((K\cdot P)_\shortparallel-M^2\right)\big] \nonumber\\ =& \frac{4}{\sqrt{\bar{u}^2}\sqrt{\bar{n}^2}} \Bigl[\left(p_0 - q_0 \left(1+\frac{(P\cdot Q)_\shortparallel-Q_\shortparallel^2}{Q^2}\right)\right) \left(-p_3+\frac{q_0q_3p_0}{q^2}-\frac{q_3}{q^2}(P\cdot Q)\right)\nonumber\\ &+\left(-k_3+\frac{q_0q_3k_0}{q^2}-\frac{q_3}{q^2}((P\cdot Q)_\shortparallel-Q_\shortparallel^2)\right)\left(p_0-q_0\frac{P\cdot Q}{Q^2}\right)\Bigr]\nonumber\\ =& A_4 + q_0 B_4, \end{align} with \begin{align} A_4 & = \frac{4p_0}{\sqrt{\bar{u}^2}\sqrt{\bar{n}^2}} \big[\left(-p_3+\frac{q_3}{q^2}(\vec{p}\cdot\vec{q})\right)+k_3\bar{n}^2\big] \label{A4_final} \end{align} and $B_4$ represents rest of the $q_0$ dependent terms. \end{subequations} Next we compute the sum over $q_0$, for which we introduce the spectral representations for the propagators. The spectral representation for the fermionic part can be obtained using \begin{align} &\frac{1}{K_\shortparallel^2-M^2} = -\frac{1}{2E'_\shortparallel} \int\limits_0^{1/T}d\tau' e^{k_0\tau'} \left[(1-n_F(E'_\shortparallel))e^{-E'_\shortparallel\tau'} - n_F(E'_\shortparallel)e^{E'_\shortparallel\tau'} \right], \end{align} with $E'_\shortparallel = \sqrt{k_3^2+M^2}$. On the other hand, pieces from the effective gluon propagator appearing in Eqs. (\ref{mathcaljs}) can be represented as \begin{align} &\mathcal{J}_i = - \int\limits_0^{1/T}d\tau~ e^{q_0\tau} \int\limits_{-\infty}^{+\infty}~ d\omega~ \rho_i(\omega,q)~\left[1+n_B(\omega)\right]~e^{-\omega\tau}. \end{align} The corresponding spectral functions are given by \begin{align} &\rho_i(\omega,q) = -\frac{1}{\pi} {\rm Im}\left(\mathcal{J}_i\Big |_{q_0 = \omega +i\epsilon}\right). \end{align} Detailed evaluations of these spectral functions are given in Appendix \ref{appC}. Now the sum over $q_0$ can be evaluated from the combination of the integrals over $\tau$ and $\tau'$, using \begin{subequations} \begin{align} \sum_{q_0} e^{q_0(\tau-\tau')} =& \delta (\tau-\tau'), \\ \sum_{q_0} q_0 ~e^{q_0(\tau-\tau')} =& \delta' (\tau-\tau'). \end{align} \end{subequations} This subsequently yields \begin{align} &\Tr\left[(\slashed{P}+M)~\Sigma(P)\right] \nonumber\\ =& ig^2\int\frac{d^4Q}{(2\pi)^4}\frac{e^{-{k_\perp^2}/{|q_fB|}}}{K_\shortparallel^2-M^2} \sum\limits_{i=1}^4 \mathcal{J}_i~\left[A_i + q_0 B_i\right] \nonumber\\ =& -g^2T\sum\limits_{i=1}^4\int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\int\limits_0^{1/T}d\tau'\int\limits_0^{1/T}d\tau ~e^{p_0\tau'-\omega\tau} \nonumber\\ &\times\sum_{q_0}e^{q_0(\tau-\tau')}\left[A_i + q_0 B_i\right]~~\frac{\rho_i(\omega,q)}{2E'_\shortparallel}\left[(1-n_F(E'_\shortparallel))e^{-E'_\shortparallel\tau'} - n_F(E'_\shortparallel)e^{E'_\shortparallel\tau'}\right] \nonumber\\ =& -g^2T\sum\limits_{i=1}^4\int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)}{2E'_\shortparallel}\left(A_iP_1 + B_iP_2 \right), \end{align} where expressions for $P_1$ and $P_2$ are given below. \begin{align} P_1 =& \int\limits_0^{1/T}d\tau'\int\limits_0^{1/T}d\tau ~e^{p_0\tau'-\omega\tau} \delta (\tau-\tau')\left[(1-n_F(E'_\shortparallel))e^{-E'_\shortparallel\tau'} - n_F(E'_\shortparallel)e^{E'_\shortparallel\tau'}\right]\nonumber\\ =& \int\limits_0^{1/T}d\tau ~e^{(p_0-\omega)\tau}\left[(1-n_F(E'_\shortparallel))e^{-E'_\shortparallel\tau} - n_F(E'_\shortparallel)e^{E'_\shortparallel\tau}\right] \nonumber\\ =&-\sum_{\sigma=\pm 1} \frac{\sigma~n_F(\sigma E'_\shortparallel)}{p_0+\sigma E'_\shortparallel-\omega}\left(e^{(p_0+\sigma E'_\shortparallel-\omega)/T}-1\right). \label{P1_final} \end{align} Similarly for $P_2$ we obtain \begin{align} P_2 =& \int\limits_0^{1/T}d\tau'\int\limits_0^{1/T}d\tau ~e^{p_0\tau'-\omega\tau} \delta'(\tau-\tau')\left[(1-n_F(E'_\shortparallel))e^{-E'_\shortparallel\tau'} - n_F(E'_\shortparallel)e^{E'_\shortparallel\tau'}\right]\nonumber\\ =& -\int\limits_0^{1/T}d\tau ~\frac{d}{d\tau}~e^{(p_0-\omega)\tau}\left[(1-n_F(E'_\shortparallel))e^{-E'_\shortparallel\tau} - n_F(E'_\shortparallel)e^{E'_\shortparallel\tau}\right] \nonumber\\ =& \sum_{\sigma=\pm 1} \sigma~n_F(\sigma E'_\shortparallel)\left(e^{(p_0+\sigma E'_\shortparallel-\omega)/T}-1\right). \label{P2_final} \end{align} At the discrete imaginary energies $p_0 = i(2n+1)\pi T$, we can eliminate the $p_0$ from the exponent as $e^{p_0/T} = -1$. Then after analytic continuation from $p_0\rightarrow E + i\epsilon$, the imaginary part of $\Sigma$ comes from the energy denominator as \begin{align} {\rm Im}~\left(\frac{1}{p_0+\sigma E'_\shortparallel - \omega}\right)\Big |_{p_0\rightarrow E+i\epsilon}= -i\pi~\delta(E + \sigma E'_\shortparallel - \omega). \end{align} As Eq.~(\ref{P2_final}) implies, $P_2$ doesn't correspond to any imaginary parts. Collecting all these finally we can write down the evaluation for the trace as \begin{align} &\Tr\left[(\slashed{P}+M)~{\rm Im}\Sigma(p_0+i\epsilon, \vec{p})\right] \nonumber \\ =& \pi g^2T\sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}} \int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)A_i}{2E'_\shortparallel} \nonumber\\ &\times\sum_{\sigma=\pm 1} \sigma~n_F(\sigma E'_\shortparallel)\left(e^{(\sigma E'_\shortparallel-\omega)/T}+1\right)\delta(E + \sigma E'_\shortparallel - \omega) \nonumber\\ =& \pi g^2T\left(e^{-E/T}+1\right)\sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)A_i}{2E'_\shortparallel}\nonumber\\ &\times\sum_{\sigma=\pm 1} \sigma~n_F(\sigma E'_\shortparallel)~\delta(E + \sigma E'_\shortparallel - \omega). \end{align} Eventually using Eq.~(\ref{interaction_rate2}), we can obtain the final expression for the interaction rate $\Gamma(E,\vec{v})$ for a particular flavor $f$ as \begin{align} \Gamma(E,\vec{v}) =& -\frac{\pi g^2T}{2E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)A_i}{2E'_\shortparallel}\nonumber\\ &\times\sum_{\sigma=\pm 1} \sigma~n_F(\sigma E'_\shortparallel)~\delta(E + \sigma E'_\shortparallel - \omega). \end{align} We can now simplify the expression for the interaction rate a bit further using the scale hierarchy $M \gg eB/T \gg T$. As $E \sim E'_\shortparallel \sim M$, so the delta function $\delta(E + E'_\shortparallel-\omega)$ cannot contribute for $\omega \leq T$. Also, the Fermi-Dirac disctribution $n_F(E'_\shortparallel)$ will be exponentially suppressed. These changes result in \begin{align} &\Gamma(E,\vec{v}) = \frac{\pi g^2T}{2E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)A_i}{2E'_\shortparallel} \delta(E - E'_\shortparallel - \omega). \end{align} \section{Energy loss and momentum diffusion coefficients for heavy quark in a strongly magnetized medium} \label{sec4} \subsection{case 1 : $\vec{v} \shortparallel \vec{B}$} \label{case1_exprs} For this case we only have a nonzero $p_3 (p_z)$ whereas $p_1 (p_x)=p_2 (p_y)=0$. Hence $E=\sqrt{p_3^2+M^2}$ and one can express $E'_\shortparallel = \sqrt{(p_3-q_3)^2+M^2}$ in terms of $E$ by expanding \begin{equation} E'_\shortparallel \approx E - \frac{p_3q_3}{E} = E - v_3q_3 \end{equation} which results in \begin{align} &\Gamma(E,v_3) = \frac{\pi g^2T}{4E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{q_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)A_i^{(1)}}{(E-v_3q_3)} \delta(\omega-v_3q_3), \end{align} where $A_i^{(1)}$ corresponds to $A_i$'s from Eqs.~(\ref{A1_final}), (\ref{A2_final}), (\ref{A3_final}) and (\ref{A4_final}) with $p_1=p_2 =0$. Next within this case we can write down the expressions for the energy loss and the respective momentum diffusion coefficients using Eq.~(\ref{coeffs_case1}). The energy loss will be given as \begin{align} &\frac{dE}{dx} = \frac{\pi g^2T}{4Ev_3} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{q_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\omega\frac{\rho_i(\omega,q)A_i^{(1)}}{(E-v_3q_3)} \delta(\omega-v_3q_3), \end{align} Now, as the spectral functions are odd functions, we can replace the factor $(1+n_B(\omega))$ with its even part, as \begin{equation} (1+n_B(\omega)) \rightarrow \frac{(1+n_B(\omega))+(1+n_B(-\omega))}{2}=\frac{1}{2}\nonumber \end{equation} resulting \begin{align} &\frac{dE}{dx} = \frac{\pi g^2T}{8Ev_3} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{q_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega~\omega~\frac{\rho_i(\omega,q)A_i^{(1)}}{(E-v_3q_3)} \delta(\omega-v_3q_3). \end{align} Similarly the transverse momentum diffusion coefficient will be given as \begin{align} &\kappa_T(p_3) = \frac{\pi g^2T}{8E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} q_\perp^2 e^{-{q_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\left[1+n_B(\omega)\right]\frac{\rho_i(\omega,q)A_i^{(1)}}{(E-v_3q_3)} \delta(\omega-v_3q_3). \end{align} Again as the spectral function is odd, we choose to replace the factor $(1+n_B(\omega))$ with its odd part, as \begin{equation} (1+n_B(\omega)) \rightarrow \frac{(1+n_B(\omega))-(1+n_B(-\omega))}{2}=\frac{1}{2}\coth\frac{\omega}{2T}\nonumber \end{equation} resulting \begin{align} &\kappa_T(p_3) = \frac{\pi g^2T}{16E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} q_\perp^2~ e^{-{q_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\coth\left(\frac{\omega}{2T}\right)\frac{\rho_i(\omega,q)A_i^{(1)}}{(E-v_3q_3)} \delta(\omega-v_3q_3). \end{align} Finally the longitudinal momentum diffusion coefficient will be given as \begin{align} &\kappa_L(p_3) = \frac{\pi g^2T}{8E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} q_3^2 ~e^{-{q_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\coth\left(\frac{\omega}{2T}\right)\frac{\rho_i(\omega,q)A_i^{(1)}}{(E-v_3q_3)} \delta(\omega-v_3q_3). \end{align} \subsection{case 2 : $\vec{v} \perp \vec{B}$} For this case we have nonzero $p_1$ and/or $p_2$ whereas $p_3=0$. Hence $E=\sqrt{p_\perp^2 + M^2}$ and $E'_\shortparallel = \sqrt{q_3^2 + M^2}$. Following similar steps as in subsection \ref{case1_exprs} and using Eq.~(\ref{coeffs_case2}), we can straightway write down the expressions for the energy loss and the diffusion momentum coefficients as \begin{align} \frac{dE}{dx} =& \frac{\pi g^2T}{8Ev} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega~\omega~\frac{\rho_i(\omega,q)A_i^{(2)}}{E'_\shortparallel} \delta(\omega-E+E'_\shortparallel), \\ \kappa_1(p) =& \frac{\pi g^2T}{8E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} q_1^2~ e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\coth\left(\frac{\omega}{2T}\right)\frac{\rho_i(\omega,q)A_i^{(2)}}{E'_\shortparallel} \delta(\omega-E+E'_\shortparallel), \\ \kappa_2(p) =& \frac{\pi g^2T}{8E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} q_2^2~ e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\coth\left(\frac{\omega}{2T}\right)\frac{\rho_i(\omega,q)A_i^{(2)}}{E'_\shortparallel} \delta(\omega-E+E'_\shortparallel),\\ \kappa_3(p) =& \frac{\pi g^2T}{8E} \sum\limits_{i=1}^4 \int\frac{d^3q}{(2\pi)^3} q_3^2 ~e^{-{k_\perp^2}/{|q_fB|}}\int\limits_{-\infty}^{+\infty} d\omega\coth\left(\frac{\omega}{2T}\right)\frac{\rho_i(\omega,q)A_i^{(2)}}{E'_\shortparallel} \delta(\omega-E+E'_\shortparallel). \end{align} Here $A_i^{(2)}$ corresponds to $A_i$'s from Eqs.~(\ref{A1_final}), (\ref{A2_final}), (\ref{A3_final}) and (\ref{A4_final}) with $p_3 =0$. \section{Results} \label{sec5} In the following subsections we discuss our findings for different momentum diffusion coefficients for heavy charm and bottom quarks moving through a strongly magnetized hot medium. To obtain the following results we have used the self consistent one-loop running coupling $g(T)$, given as \begin{equation} g(T) = \left[\frac{48\pi^2}{(33-2N_f)\ln\left(\frac{\Lambda^2}{\Lambda_{\overline{MS}}^2}\right)}\right]^{1/2}, \end{equation} where $\Lambda$ and $\Lambda_{\overline{MS}}$ are respectively the renormalization and $\overline{MS}$ scales. The renormalization scale for the present work is chosen to be $2\pi T$. $\Lambda_{\overline{MS}}$ is fixed by requiring the value of $\alpha_s=g^2/4\pi=0.326$ for $T=1.5$ GeV, which is obtained from lattice calculations~\cite{Bazavov:2012ka}. For the one loop running coupling this procedure yields $\Lambda_{\overline{MS}} = 176$ MeV. \subsection{case 1 : $\vec{v} \shortparallel \vec{B}$} \label{case1_results} For the $\vec{v} \shortparallel \vec{B}$ case we have only one anisotropic direction which gives rise to two different momentum coefficients, namely $\kappa_L$ and $\kappa_T$, representating the longitudinal and transverse components. In this case the heavy quark momentum is only nonvanishing in the $\vec{B}$ direction, which we have chosen to be $z$. In the following we discuss our results for $\kappa_L$ and $\kappa_T$ for charm and bottom quarks (mass $M=1.28$ GeV and $M=4.18$ GeV respectively) moving parallel to an external magnetic field along the $z$ direction. We have also compared our finite $eB$ results with the $eB=0$ results obtained from Ref.~\cite{Beraudo:2009pe}. We have chosen the Ultra-Violate (UV) cut-off $q_{max}$ required for the $eB=0$ case as $q_{max} = 3.1T g(T)^{1/3}$, as discussed in Ref.~\cite{Beraudo:2009pe}. We would also like to note at this point that for finite $eB$ calculations, an UV cut-off like $q_{max}$ is not necessary due to the $e^{-k_\perp^2/|q_fB|}$ factor appearing from the fermion propagator in a magnetized medium. \begin{figure*}[t] \begin{center} \includegraphics[scale=0.5]{kappaLvsT_scaled.pdf} \hspace{1cm} \includegraphics[scale=0.5]{kappaTvsT_scaled.pdf} \caption{Variation of the scaled charm (solid lines) and bottom (dashed lines) quark momentum diffusion coefficients (for $\vec{v} \shortparallel \vec{B}$) with temperature for three different values of external magnetic field, i.e. $eB=0, 15m_\pi^2, 20m_\pi^2$. Left panel shows the variation of the scaled longitudinal components $\kappa_L$, whereas right panel shows the same for the scaled transverse components $\kappa_T$. Charm and bottom quark masses $M$ are specified in the text and HQ momentum $p$ is taken to be 1 GeV. } \label{kappavT_LT_scaled} \end{center} \end{figure*} In Fig. \ref{kappavT_LT_scaled} we have plotted the variations of scaled longitudinal and transverse momentum coefficients, $\kappa_L/T^3$ (left panel) and $\kappa_T/T^3$ (right panel) with temperature. In both the plots we have shown the variations of both charm (solid lines) and bottom (dashed lines) quarks for three different values of magnetic field, i.e. $eB=0, 15m_\pi^2$ and $20 m_\pi^2$. The heavy quark momentum $p$ has been taken to be 1 GeV. It can be observed from Fig. \ref{kappavT_LT_scaled} that for increasing magnetic field, both longitudinal and transverse components of the momentum diffusion coefficients have increased. Although when compared with the $eB=0$ case, the values for $\kappa_T$ appear to be significantly reduced for finite magnetic fields. One can also notice a crossover between the curves of charm and bottom quarks for finite $eB$ which suggests that though $\kappa_L$ and $\kappa_T$ of charm quarks are bigger than the bottom quarks for lower temperatures, after crossing a certain temperature, the bottom quark momentum coefficients surpass the same for charm quark. For $eB=0$, no such crossover was observed. \begin{figure*}[!hbt] \begin{center} \includegraphics[scale=0.5]{kappavsT_charm_scaled.pdf}\hspace{1cm}\includegraphics[scale=0.5]{kappavsT_bottom_scaled.pdf} \caption{Variation of the scaled HQ longitudinal (solid lines) and transverse (dashed lines) momentum diffusion coefficients (for $\vec{v} \shortparallel \vec{B}$) with temperature for three different values of external magnetic field, i.e. $eB=0, 15m_\pi^2, 20m_\pi^2$ and for both charm (left panel) and bottom (right panel) quarks. Charm and bottom quark masses $M$ are specified in the text and HQ momentum $p$ is taken to be 1 GeV. } \label{kappavT_cb_scaled} \end{center} \end{figure*} Fig. \ref{kappavT_cb_scaled} shows a similar variation as in Fig. \ref{kappavT_LT_scaled}, but this time we show two different plots for charm (left panel) and bottom (right panel) quarks and in each plots we present both $\kappa_L$ (solid lines) and $\kappa_T$ (dashed lines) together. Here also we choose the heavy quark momentum to be 1 GeV. As was also evident from Fig. \ref{kappavT_LT_scaled}, interestingly we observe that though for finite $eB$, values of $\kappa_L$ are significantly higher than $\kappa_T$, for $eB=0$ the situation is different. For charm quark (left panel) values of $\kappa_T$ at $eB=0$ is higher than $\kappa_L$ and for bottom quark (right panel) $\kappa_L$ and $\kappa_T$ fall on top of each other. \begin{figure} \begin{center} \includegraphics[scale=0.5]{kappaTvsT_scaled_diffp.pdf} \caption{Variation of the scaled HQ transverse momentum diffusion coefficient (for $\vec{v} \shortparallel \vec{B}$) with temperature for two different values of external magnetic field and two different values of the HQ momentum $p$. Heavy quark masses $M$ are specified in the text. } \label{kappaT_scaled_vp} \end{center} \end{figure} \begin{figure*}[!hbt] \begin{center} \includegraphics[scale=0.5]{kappavsT_charm_scaled_vperpB.pdf}\hspace{1cm} \includegraphics[scale=0.5]{kappavsT_bottom_scaled_vperpB.pdf} \caption{Variation of the scaled charm (left panel) and bottom (right panel) quark momentum diffusion coefficients (for $\vec{v} \perp \vec{B}$) with temperature for two different values of external magnetic fields, i.e. $eB=15 m_\pi^2$ and $20m_\pi^2$. For both the cases we have shown the plots for scaled transverse components $\kappa_1$ (solid lines), $\kappa_2$ (dashed lines) and longitudinal component $\kappa_3$ (dotted lines). Charm and bottom quark masses $M$ are specified in the text and HQ momentum $p$ is taken to be 1 GeV. } \label{kappavT_scaled_cb_vperpB} \end{center} \end{figure*} \begin{figure}[!hbt] \begin{center} \includegraphics[scale=0.55]{kappa1vsT_scaled.pdf} \includegraphics[scale=0.55]{kappa2vsT_scaled.pdf} \includegraphics[scale=0.55]{kappa3vsT_scaled.pdf} \caption{Variation of the scaled HQ transverse ($\kappa_1$ and $\kappa_2$, top 2 panels) and longitudinal ($\kappa_3$, bottom panel) momentum diffusion coefficients (for $\vec{v} \perp \vec{B}$) with temperature for two different values of external magnetic fields, i.e. $eB=15m_\pi^2$ and $20m_\pi^2$. In each plot, we have shown the variations for charm (solid lines) and bottom (dashed lines) quarks. Heavy quark masses $M$ are specified in the text and momentum $p$ is taken to be 1 GeV. } \label{kappavT_scaled_123_vperpB} \end{center} \end{figure} \begin{figure}[!hbt] \begin{center} \includegraphics[scale=0.55]{kappa1vsp.pdf} \includegraphics[scale=0.55]{kappa2vsp.pdf} \includegraphics[scale=0.55]{kappa3vsp.pdf} \caption{Variation of the HQ longitudinal (bottom panel) and transverse (top two panels) momentum diffusion coefficients (for $\vec{v} \perp \vec{B}$) with HQ momentum for two different values of external magnetic fields, i.e. $eB=15m_\pi^2$ and $20m_\pi^2$. In each plot we have presented curves for both charm (solid lines) and bottom (dashed) quarks. Heavy quark masses $M$ are specified in the text and the temperature $T$ is taken to be 0.2 GeV. } \label{kappavp_vperpB} \end{center} \end{figure} We have also shown the variation of $\kappa_T$ with temperature for charm quark with two different values of the external momentum $p$ in Fig. \ref{kappaT_scaled_vp}. Again we have chosen two different values of the magnetic field, $eB= 15m_\pi^2$ and $20m_\pi^2$. This plot is done to check the consistency of our calculation as we have maintained the scale hierarchy of $M\gg p$ ( $M$ is the heavy quark mass) and simplified our expressions accordingly. For bottom quark mass $M=4.18 GeV$ this condition is easily satisfied. But for charm quark since $M=1.28$ GeV, and we have chosen $p=1$ GeV for most of our results, it was necessary to compare any of our result with a different (smaller) value of $p$. It can be seen from figure \ref{kappaT_scaled_vp} that the behavior for two different values of $p$ are almost identical. For lower values of $T$ the HQ with larger momentum has larger $\kappa_T$, but after a certain temperature one can observe a crossover and for higher values of $T$ the situation is opposite, i.e. HQ with lower momentum has larger $\kappa_T$. \subsection{case 2 : $\vec{v} \perp \vec{B}$} \label{case2_results} For the $\vec{v} \perp \vec{B}$ case we have two anisotropic directions given by $\vec{v}$ and $\vec{B}$. These subsequently give rise to three different momentum coefficients, which we have noted as $\kappa_1$, $\kappa_2$ and $\kappa_3$ in the present study, representating the longitudinal ($\kappa_3$) and transverse ($\kappa_1, \kappa_2$) components. In this case the heavy quark momenta can be nonvanishing in any of the directions transverse to $\vec{B}$ direction ($z$), i.e. $x$ and/or $y$. In the following we choose a particular system where the heavy quark is chosen to be moving along the $x$ direction. Hence the heavy quark momentum has only one nonvanishing component along the $x$ direction. We discuss our findings for $\kappa_1$, $\kappa_2$ and $\kappa_3$ for charm and bottom quarks (mass $M=1.28$ GeV and $M=4.18$ GeV respectively) moving perpendicular ($x$ direction) to an external magnetic field along the $z$ direction. In Fig. \ref{kappavT_scaled_cb_vperpB} we have shown the variation of the scaled heavy quark momentum diffusion coefficients with temperature for two different values of external magnetic fields, i.e. $eB=15 m_\pi^2$ and $20m_\pi^2$. We have presented two separate plots for the charm (left panel) and bottom (right panel) quarks. For both the cases we have shown the variations for scaled transverse components $\kappa_1$ (solid lines), $\kappa_2$ (dashed lines) and longitudinal component $\kappa_3$ (dotted lines). One can observe from the plots that for both charm and bottom quarks, values of the longitudinal component $\kappa_3$ (dotted lines) are the largest, followed by the transverse component $\kappa_1$ (solid lines). Values of $\kappa_2$ (dashed lines), which is basically transverse to both the magnetic field and the velocity directions, appear to be the lowest of the plot, almost an order of magnitude lower than $\kappa_1$. Also we can see that with an increasing magnetic field, values for all the HQ momentum diffusion components have also increased. Fig. \ref{kappavT_scaled_123_vperpB} shows the similar variation as in Fig. \ref{kappavT_scaled_cb_vperpB}, but this time the representation is different. Here we have compared charm (solid lines) and bottom (dashed lines) quark curves together for three different plots, one each for $\kappa_1$, $\kappa_2$ and $\kappa_3$. One can observe prominent crossovers, similar to what we have encountered for the $\vec{v}\shortparallel \vec{B}$ case, for the plots of the transverse components $\kappa_1$ and $\kappa_2$. Once again, the bottom quark momentum diffusion coefficients dominate over the charm quark for higher values of the temperature whereas it is the opposite for lower values of $T$. For the longitudinal component $\kappa_3$, within the temperature range we have studied, no crossover were found. The bottom and charm quark curves start from similar values at very low $T$ and gradually with increasing $T$, the bottom quark longitudinal momentum diffusion coefficient starts to dominate, which is evident from the plot. Finally in Fig. \ref{kappavp_vperpB} we have shown the variation of the longitudinal (bottom panel) and transverse (top two panels) momentum diffusion coefficients with HQ momentum $p$ for two different values of external magnetic fields, i.e. $eB=15m_\pi^2$ and $20m_\pi^2$. In each plot we have presented curves for both charm (solid lines) and bottom (dashed) quarks. The fixed temperature in this case is taken to be $T=0.2$ GeV. All three plots suggest that for lower values of HQ momentum, bottom quark momentum diffusion coefficients dominate over the charm quark. the behaviors of $\kappa_2$ and $\kappa_3$ are qualitatively similar as for both the cases, with increasing $p$, values of the coefficients gradually fall. Although for $\kappa_1$, the behavior is quite different with increasing $p$, as the value of $\kappa_1$ first starts to grow and then after $p\sim 0.6$ GeV again starts to fall. Both the slopes of enhancement and of reduction in this case are more prominent for the bottom quarks. \section{Summary} \label{sec6} In summary, we have studied the transport coefficients for heavy quarks (charm and bottom) moving in a hot quark-gluon plasma under the presence of a strong external magnetic field along the $z$ direction. We have considered two specific cases, i.e. when the HQ is moving parallel to the external magnetic field ($\vec{v}\shortparallel\vec{B}$) and when the HQ is moving perpendicular to the external magnetic field ($\vec{v}\perp\vec{B}$). For these two cases we have evaluated the energy loss $dE/dx$ and the momentum diffusion coefficients within the HTL approximation. To incorporate the soft gluonic momenta in our evaluation, we have worked with the recently obtained effective HTL gluon propagator in a hot and magnetized medium~\cite{Karmakar:2018aig}. For $\vec{v}\shortparallel\vec{B}$, we have one anisotropic direction along $z$ which results in two different momentum diffusion coefficients, longitudinal $\kappa_L$ and transverse $\kappa_T$. On the other hand for $\vec{v}\perp\vec{B}$ we have two different anisotropic direction (in our case we have chosen that the HQ is moving along $x$ direction) which results in three different momentum diffusion coefficients along three spatial directions, i.e. $\kappa_1, \kappa_2$ and $\kappa_3$. Considering the $\vec{B}$ direction as our reference, we have called $\kappa_3$ as the longitudinal and $\kappa_{1,2}$ as two transverse coefficients. For all these different $\kappa$'s, we have shown the variation with temperature for different values of $eB$, both for charm and bottom quarks which revealed some interesting features. Many of these results are obtained for the first time. Numerical evaluations demonstrate a considerable influence of the strong magnetic field on these coefficients for $eB$ values accessible in high energy heavy ion collisions. We have also found an interesting crossover between the charm and bottom quark momentum diffusion coefficients at certain values of temperatures for finite values of $eB$ which is absent for the $eB=0$ case. It may be noted that the present calculations can be easily adapted to numerically evaluate the fullly anisotropic drag coefficients for the HQ velocity in arbitrary direction. A natural next step is to go beyond the LLL approximation adopted in the present work under the assumption of extremely strong magnetic field. This is a very challenging task but may be important for realistic applications. It would also be highly interesting to explore the phenomenological implications of our theoretical results. For example, one could implement the $eB$ and HQ $\vec{v}$ dependent drag coefficients into a Langevin transport code (e.g.~\cite{Li:2019lex}) and examine the dynamical HQ in-medium evolution. In particular, there could be nontrivial consequence of the anisotropic trnasport coefficients due to the magnetic field for experimental observables such as directed and elliptic flow of the open heavy flavor mesons. We expect to report progress along these lines in a future work. \begin{acknowledgments} This work is supported by the Guangdong Major Project of Basic and Applied Basic Research No. 2020B0301030008, Science and Technology Program of Guangzhou Project No. 2019050001, the National Natural Science Foundation of China under Grant No. 12022512, No. 12035007, as well as the NSF Grant No. PHY-1913729. \end{acknowledgments} \clearpage
{ "redpajama_set_name": "RedPajamaArXiv" }
1,606
Q: Homomorphism from complex numbers with addition to the non zero complex numbers with multiplication injective? Surjective? Homomorphism from complex numbers with addition to the non zero complex numbers with multiplication injective? Surjective? I have been given the map $\phi:\mathbb{C}\rightarrow \mathbb{C}-\{0\}$ by $\phi:z \mapsto e^z$. I have shown the map is not injective. I'm not sure about surjectivity though? How do I prove it is surjective (or not)?
{ "redpajama_set_name": "RedPajamaStackExchange" }
5,206
#if !defined(BOOST_SPIRIT_ACTION_DISPATCH_APR_18_2008_0720AM) #define BOOST_SPIRIT_ACTION_DISPATCH_APR_18_2008_0720AM #include <boost/spirit/home/support/detail/values.hpp> #include <boost/spirit/home/phoenix/core/actor.hpp> namespace boost { namespace spirit { namespace detail { // general handler for everything not explicitly specialized below template <typename F, typename Attribute, typename Context, bool IsSequence> bool action_dispatch(F const& f, Attribute& attr, Context& context , mpl::bool_<IsSequence>) { bool pass = true; f(attr, context, pass); return pass; } // handler for phoenix actors // If the component this action has to be invoked for is a sequence, we // wrap any non-fusion sequence into a fusion sequence (done by pass_value) // and pass through any fusion sequence. template <typename Eval, typename Attribute, typename Context> bool action_dispatch(phoenix::actor<Eval> const& f , Attribute& attr, Context& context, mpl::true_) { bool pass = true; f (pass_value<Attribute>::call(attr), context, pass); return pass; } // If this action has to be invoked for anything but a sequence, we always // need to wrap the attribute into a fusion sequence, because the attribute // has to be treated as being a single value in any case (even if it // actually already is a fusion sequence on its own). template <typename Eval, typename Attribute, typename Context> bool action_dispatch(phoenix::actor<Eval> const& f , Attribute& attr, Context& context, mpl::false_) { bool pass = true; fusion::vector<Attribute&> wrapped_attr(attr); f (wrapped_attr, context, pass); return pass; } // specializations for plain function pointers taking a different number of // arguments template <typename RT, typename A0, typename A1, typename A2 , typename Attribute, typename Context, bool IsSequence> bool action_dispatch(RT(*f)(A0, A1, A2) , Attribute& attr, Context& context, mpl::bool_<IsSequence>) { bool pass = true; f(attr, context, pass); return pass; } template <typename RT, typename A0, typename A1 , typename Attribute, typename Context, bool IsSequence> bool action_dispatch(RT(*f)(A0, A1) , Attribute& attr, Context& context, mpl::bool_<IsSequence>) { f(attr, context); return true; } template <typename RT, typename A0 , typename Attribute, typename Context, bool IsSequence> bool action_dispatch(RT(*f)(A0) , Attribute& attr, Context&, mpl::bool_<IsSequence>) { f(attr); return true; } template <typename RT , typename Attribute, typename Context, bool IsSequence> bool action_dispatch(RT(*f)() , Attribute&, Context&, mpl::bool_<IsSequence>) { f(); return true; } }}} #endif
{ "redpajama_set_name": "RedPajamaGithub" }
4,265
import { jestConsoleContext, jestContext } from '@prisma/internals' import fs from 'fs' import path from 'path' import stripAnsi from 'strip-ansi' import { DbExecute } from '../commands/DbExecute' import { setupCockroach, tearDownCockroach } from '../utils/setupCockroach' import { setupMSSQL, tearDownMSSQL } from '../utils/setupMSSQL' import { setupMysql, tearDownMysql } from '../utils/setupMysql' import type { SetupParams } from '../utils/setupPostgres' import { setupPostgres, tearDownPostgres } from '../utils/setupPostgres' const util = require('util') const exec = util.promisify(require('child_process').exec) const ctx = jestContext.new().add(jestConsoleContext()).assemble() const describeIf = (condition: boolean) => (condition ? describe : describe.skip) const testIf = (condition: boolean) => (condition ? test : test.skip) describe('db execute', () => { describe('generic', () => { it('should trigger a warning if --preview-feature is provided', async () => { ctx.fixture('empty') expect.assertions(3) try { await DbExecute.new().parse(['--preview-feature', '--file=./doesnotexists.sql', '--schema=1']) } catch (e) { expect(e.code).toEqual(undefined) expect(e.message).toMatchInlineSnapshot(`Provided --file at ./doesnotexists.sql doesn't exist.`) } expect(stripAnsi(ctx.mocked['console.warn'].mock.calls.join('\n'))).toMatchInlineSnapshot(` prisma:warn "prisma db execute" was in Preview and is now Generally Available. You can now remove the --preview-feature flag. `) }) it('should fail if missing --file and --stdin', async () => { ctx.fixture('empty') const result = DbExecute.new().parse([]) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` Either --stdin or --file must be provided. See \`prisma db execute -h\` `) }) it('should fail if both --file and --stdin are provided', async () => { ctx.fixture('empty') const result = DbExecute.new().parse(['--file=1', '--stdin']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` --stdin and --file cannot be used at the same time. Only 1 must be provided. See \`prisma db execute -h\` `) }) it('should fail if missing --schema and --url', async () => { ctx.fixture('empty') const result = DbExecute.new().parse(['--file=1']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` Either --url or --schema must be provided. See \`prisma db execute -h\` `) }) it('should fail if both --schema and --url are provided', async () => { ctx.fixture('empty') const result = DbExecute.new().parse(['--stdin', '--schema=1', '--url=1']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` --url and --schema cannot be used at the same time. Only 1 must be provided. See \`prisma db execute -h\` `) }) it('should fail if --file does no exists', async () => { ctx.fixture('empty') expect.assertions(2) try { await DbExecute.new().parse(['--file=./doesnotexists.sql', '--schema=1']) } catch (e) { expect(e.code).toEqual(undefined) expect(e.message).toMatchInlineSnapshot(`Provided --file at ./doesnotexists.sql doesn't exist.`) } }) it('should fail if --schema does no exists', async () => { ctx.fixture('empty') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse(['--file=./script.sql', '--schema=./doesnoexists.schema']) } catch (e) { expect(e.code).toEqual(undefined) expect(e.message).toMatchInlineSnapshot(`Provided --schema at ./doesnoexists.schema doesn't exist.`) } }) }) describe('mongodb', () => { it('should fail with not supported error with --file --schema', async () => { ctx.fixture('schema-only-mongodb') fs.writeFileSync('script.js', 'Something for MongoDB') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.js']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` dbExecute is not supported on MongoDB `) }) }) describe('sqlite', () => { const pathToBin = path.resolve('src/bin.ts') const sqlScript = `-- Drop & Create & Drop DROP TABLE IF EXISTS 'test-dbexecute'; CREATE TABLE 'test-dbexecute' ("id" INTEGER PRIMARY KEY); DROP TABLE 'test-dbexecute';` it('should pass if no schema file in directory with --file --url', async () => { ctx.fixture('empty') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url=file:./dev.db', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // On Windows: snapshot output = "-- Drop & Create & Drop" testIf(process.platform !== 'win32')( 'should pass with --stdin --schema', async () => { ctx.fixture('schema-only-sqlite') const { stdout, stderr } = await exec( `echo "${sqlScript}" | ${pathToBin} db execute --stdin --schema=./prisma/schema.prisma`, ) expect(stderr).toBeFalsy() expect(stdout).toMatchInlineSnapshot(` Script executed successfully. `) // This is a slow test and macOS machine can be even slower and fail the test }, 30_000, ) it('should pass with --file --schema', async () => { ctx.fixture('schema-only-sqlite') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass using a transaction with --file --schema', async () => { ctx.fixture('schema-only-sqlite') fs.writeFileSync( 'script.sql', `-- start a transaction BEGIN; ${sqlScript} -- commit changes COMMIT;`, ) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass with --file --url=file:dev.db', async () => { ctx.fixture('introspection/sqlite') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url=file:dev.db', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass with empty --file --url=file:dev.db', async () => { ctx.fixture('introspection/sqlite') fs.writeFileSync('script.sql', '') const result = DbExecute.new().parse(['--url=file:dev.db', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should fail with P1013 error with invalid url with --file --url', async () => { ctx.fixture('schema-only-sqlite') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse(['--url=invalidurl', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. \`invalidurl\` is not a known connection URL scheme. Prisma cannot determine the connector. in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) // the default behavior with sqlite is to create the db if it doesn't exists, no failure expected it('should pass with --file --url=file:doesnotexists.db', async () => { ctx.fixture('introspection/sqlite') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url=file:doesnotexists.db', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // TODO we could have a generic error code in prisma-engines for a "SQL error" it('should fail with --file --schema if there is a database error', async () => { ctx.fixture('schema-only-sqlite') expect.assertions(1) fs.writeFileSync('script.sql', 'DROP TABLE "test-doesnotexists";') try { await DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) } catch (e) { expect(e.message).toMatchInlineSnapshot(` SQLite database error no such table: test-doesnotexists `) } }) it('should fail with invalid SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-sqlite') expect.assertions(2) fs.writeFileSync('script.sql', 'ThisisnotSQL,itshouldfail') try { await DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual(undefined) expect(e.message).toMatchInlineSnapshot(` SQLite database error near "ThisisnotSQL": syntax error `) } }) }) describe('postgresql', () => { const connectionString = ( process.env.TEST_POSTGRES_URI_MIGRATE || 'postgres://prisma:prisma@localhost:5432/tests-migrate' ).replace('tests-migrate', 'tests-migrate-db-execute') // Update env var because it's the one that is used in the schemas tested process.env.TEST_POSTGRES_URI_MIGRATE = connectionString const setupParams: SetupParams = { connectionString, dirname: '', } beforeAll(async () => { await setupPostgres(setupParams).catch((e) => { console.error(e) }) }) afterAll(async () => { await tearDownPostgres(setupParams).catch((e) => { console.error(e) }) }) const sqlScript = `-- Drop & Create & Drop DROP SCHEMA IF EXISTS "test-dbexecute"; CREATE SCHEMA "test-dbexecute"; DROP SCHEMA "test-dbexecute";` it('should pass with --file --schema', async () => { ctx.fixture('schema-only-postgresql') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should use env var from .env file', async () => { ctx.fixture('schema-only-postgresql') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/using-dotenv.prisma', '--file=./script.sql']) await expect(result).rejects.toMatchInlineSnapshot(` P1001 Can't reach database server at \`fromdotenvdoesnotexist\`:\`5432\` Please make sure your database server is running at \`fromdotenvdoesnotexist\`:\`5432\`. `) }) it('should pass using a transaction with --file --schema', async () => { ctx.fixture('schema-only-postgresql') fs.writeFileSync( 'script.sql', `-- start a transaction BEGIN; ${sqlScript} -- commit changes COMMIT;`, ) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass with --file --url', async () => { ctx.fixture('schema-only-postgresql') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url', connectionString, '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass with empty --file --url', async () => { ctx.fixture('schema-only-postgresql') fs.writeFileSync('script.sql', '') const result = DbExecute.new().parse(['--url', connectionString, '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // Limitation of postgresql // DROP DATABASE cannot be executed from a function or multi-command string // on GitHub Actions, for macOS and Windows it errors with // DROP DATABASE cannot run inside a transaction block it('should fail if DROP DATABASE with --file --schema', async () => { ctx.fixture('schema-only-postgresql') expect.assertions(2) fs.writeFileSync( 'script.sql', `-- Drop & Create & Drop DROP DATABASE IF EXISTS "test-dbexecute"; CREATE DATABASE "test-dbexecute"; DROP DATABASE "test-dbexecute";`, ) try { await DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual(undefined) expect(e.message).toContain('ERROR: DROP DATABASE cannot') } }) it('should fail with P1013 error with invalid url with --file --url', async () => { ctx.fixture('schema-only-postgresql') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=postgresql://johndoe::::////::randompassword@doesnotexist/mydb', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. invalid port number in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) it('should fail with P1013 error with invalid url provider with --file --url', async () => { ctx.fixture('schema-only-postgresql') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse(['--url=invalidurl', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. \`invalidurl\` is not a known connection URL scheme. Prisma cannot determine the connector. in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) it('should fail with P1001 error with unreachable url with --file --url', async () => { ctx.fixture('schema-only-postgresql') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=postgresql://johndoe:randompassword@doesnotexist:5432/mydb?schema=public', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1001') expect(e.message).toMatchInlineSnapshot(` P1001 Can't reach database server at \`doesnotexist\`:\`5432\` Please make sure your database server is running at \`doesnotexist\`:\`5432\`. `) } }) it('should fail with P1003 error with --file --schema', async () => { ctx.fixture('schema-only-postgresql') expect.assertions(2) fs.writeFileSync('script.sql', 'DROP DATABASE "test-doesnotexists";') try { await DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual('P1003') expect(e.message).toMatchInlineSnapshot(` P1003 Database \`test-doesnotexists\` does not exist on the database server at \`localhost:5432\`. `) } }) it('should fail with invalid SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-postgresql') fs.writeFileSync('script.sql', 'ThisisnotSQLitshouldfail') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` db error: ERROR: syntax error at or near "ThisisnotSQLitshouldfail" `) }) }) describeIf(!process.env.TEST_SKIP_COCKROACHDB)('cockroachdb', () => { const connectionString = ( process.env.TEST_COCKROACH_URI_MIGRATE || 'postgresql://prisma@localhost:26257/tests-migrate' ).replace('tests-migrate', 'tests-migrate-db-execute') // Update env var because it's the one that is used in the schemas tested process.env.TEST_COCKROACH_URI_MIGRATE = connectionString const setupParams = { connectionString, dirname: '', } beforeAll(async () => { await setupCockroach(setupParams).catch((e) => { console.error(e) }) }) afterAll(async () => { await tearDownCockroach(setupParams).catch((e) => { console.error(e) }) }) const sqlScript = `-- Drop & Create & Drop DROP SCHEMA IF EXISTS "test-dbexecute"; CREATE SCHEMA "test-dbexecute"; DROP SCHEMA "test-dbexecute";` // eslint-disable-next-line jest/no-identical-title it('should pass with --file --schema', async () => { ctx.fixture('schema-only-cockroachdb') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }, 10000) // eslint-disable-next-line jest/no-identical-title it('should use env var from .env file', async () => { ctx.fixture('schema-only-cockroachdb') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/using-dotenv.prisma', '--file=./script.sql']) await expect(result).rejects.toMatchInlineSnapshot(` P1001 Can't reach database server at \`fromdotenvdoesnotexist\`:\`26257\` Please make sure your database server is running at \`fromdotenvdoesnotexist\`:\`26257\`. `) }, 10000) // eslint-disable-next-line jest/no-identical-title it('should pass using a transaction with --file --schema', async () => { ctx.fixture('schema-only-cockroachdb') fs.writeFileSync( 'script.sql', `-- start a transaction BEGIN; ${sqlScript} -- commit changes COMMIT;`, ) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }, 10000) // eslint-disable-next-line jest/no-identical-title it('should pass with --file --url', async () => { ctx.fixture('schema-only-cockroachdb') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url', connectionString, '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // eslint-disable-next-line jest/no-identical-title it('should pass with empty --file --url', async () => { ctx.fixture('schema-only-cockroachdb') fs.writeFileSync('script.sql', '') const result = DbExecute.new().parse(['--url', connectionString, '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // Cockroachdb doesn't have the same limitation as Postgres, as it can drop and create a database // with a single SQL script. it('should succeed if DROP DATABASE with --file --schema', async () => { ctx.fixture('schema-only-cockroachdb') expect.assertions(0) fs.writeFileSync( 'script.sql', `-- Drop & Create & Drop DROP DATABASE IF EXISTS "test-dbexecute"; CREATE DATABASE "test-dbexecute"; DROP DATABASE "test-dbexecute";`, ) try { await DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual(undefined) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with P1013 error with invalid url with --file --url', async () => { ctx.fixture('schema-only-cockroachdb') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=postgresql://johndoe::::////::randompassword@doesnotexist/mydb', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. invalid port number in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with P1013 error with invalid url provider with --file --url', async () => { ctx.fixture('schema-only-cockroachdb') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse(['--url=invalidurl', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. \`invalidurl\` is not a known connection URL scheme. Prisma cannot determine the connector. in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with P1001 error with unreachable url with --file --url', async () => { ctx.fixture('schema-only-cockroachdb') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=postgresql://johndoe:randompassword@doesnotexist:5432/mydb?schema=public', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1001') expect(e.message).toMatchInlineSnapshot(` P1001 Can't reach database server at \`doesnotexist\`:\`5432\` Please make sure your database server is running at \`doesnotexist\`:\`5432\`. `) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with invalid SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-cockroachdb') fs.writeFileSync('script.sql', 'ThisisnotSQLitshouldfail') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` db error: ERROR: at or near "thisisnotsqlitshouldfail": syntax error DETAIL: source SQL: ThisisnotSQLitshouldfail ^ `) }) }) describe('mysql', () => { const connectionString = ( process.env.TEST_MYSQL_URI_MIGRATE || 'mysql://root:root@localhost:3306/tests-migrate' ).replace('tests-migrate', 'tests-migrate-db-execute') // Update env var because it's the one that is used in the schemas tested process.env.TEST_MYSQL_URI_MIGRATE = connectionString const setupParams: SetupParams = { connectionString, dirname: '', } beforeAll(async () => { await setupMysql(setupParams).catch((e) => { console.error(e) }) }) afterAll(async () => { await tearDownMysql(setupParams).catch((e) => { console.error(e) }) }) const sqlScript = `-- Drop & Create & Drop DROP DATABASE IF EXISTS \`test-dbexecute\`; CREATE DATABASE \`test-dbexecute\`; DROP DATABASE \`test-dbexecute\`;` it('should pass with --file --schema', async () => { ctx.fixture('schema-only-mysql') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // Only fails on MySQL it('should fail with empty --file --schema', async () => { ctx.fixture('schema-only-mysql') fs.writeFileSync('script.sql', '') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` Query was empty `) }) it('should pass using a transaction with --file --schema', async () => { ctx.fixture('schema-only-mysql') fs.writeFileSync( 'script.sql', `-- start a transaction START TRANSACTION; ${sqlScript} -- commit changes COMMIT;`, ) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass with --file --url', async () => { ctx.fixture('schema-only-mysql') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url', connectionString, '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should fail with P1013 error with invalid url with --file --url', async () => { ctx.fixture('schema-only-mysql') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=mysql://johndoe::::////::randompassword@doesnotexist:3306/mydb', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. invalid port number in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) it('should fail with P1013 error with invalid url provider with --file --url', async () => { ctx.fixture('schema-only-mysql') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse(['--url=invalidurl', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. \`invalidurl\` is not a known connection URL scheme. Prisma cannot determine the connector. in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) it('should fail with P1001 error with unreachable url with --file --url', async () => { ctx.fixture('schema-only-mysql') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=mysql://johndoe:randompassword@doesnotexist:3306/mydb', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1001') expect(e.message).toMatchInlineSnapshot(` P1001 Can't reach database server at \`doesnotexist\`:\`3306\` Please make sure your database server is running at \`doesnotexist\`:\`3306\`. `) } }) it('should fail with SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-mysql') fs.writeFileSync('script.sql', 'DROP DATABASE `test-doesnotexists`;') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` Can't drop database 'test-doesnotexists'; database doesn't exist `) }) it('should fail with invalid SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-mysql') fs.writeFileSync('script.sql', 'This is not SQL, it should fail') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'This is not SQL, it should fail' at line 1 `) }) }) describeIf(!process.env.TEST_SKIP_MSSQL)('sqlserver', () => { const jdbcConnectionString = ( process.env.TEST_MSSQL_JDBC_URI_MIGRATE || 'sqlserver://mssql:1433;database=tests-migrate;user=SA;password=Pr1sm4_Pr1sm4;trustServerCertificate=true;' ).replace('tests-migrate', 'tests-migrate-db-execute') // Update env var because it's the one that is used in the schemas tested process.env.TEST_MSSQL_JDBC_URI_MIGRATE = jdbcConnectionString const setupParams: SetupParams = { connectionString: process.env.TEST_MSSQL_URI!, dirname: '', } beforeAll(async () => { await setupMSSQL(setupParams, 'tests-migrate-db-execute').catch((e) => { console.error(e) }) }) afterAll(async () => { await tearDownMSSQL(setupParams, 'tests-migrate-db-execute').catch((e) => { console.error(e) }) }) const sqlScript = `-- Drop & Create & Drop DROP DATABASE IF EXISTS "test-dbexecute"; CREATE DATABASE "test-dbexecute"; DROP DATABASE "test-dbexecute";` // eslint-disable-next-line jest/no-identical-title it('should pass with --file --schema', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) it('should pass with empty --file --schema', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync('script.sql', '') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // eslint-disable-next-line jest/no-identical-title it('should pass with --file --url', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync('script.sql', sqlScript) const result = DbExecute.new().parse(['--url', jdbcConnectionString, '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // eslint-disable-next-line jest/no-identical-title it('should pass using a transaction with --file --schema', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync( 'script.sql', `-- start a transaction BEGIN TRANSACTION; SELECT 1 -- commit changes COMMIT;`, ) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).resolves.toMatchInlineSnapshot(`Script executed successfully.`) }) // Limitation of sqlserver // DROP DATABASE statement cannot be used inside a user transaction. // eslint-disable-next-line jest/no-identical-title it('should fail if DROP DATABASE in a transaction with --file --schema', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync( 'script.sql', `-- start a transaction BEGIN TRANSACTION; ${sqlScript} -- commit changes COMMIT;`, ) const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` DROP DATABASE statement cannot be used inside a user transaction. `) }) // eslint-disable-next-line jest/no-identical-title it('should fail with P1013 error with invalid url with --file --url', async () => { ctx.fixture('schema-only-sqlserver') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=sqlserver://doesnotexist:1433;;;;database=tests-migrate;user=SA;password=Pr1sm4_Pr1sm4;trustServerCertificate=true;', '--file=./script.sql', ]) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. Error parsing connection string: Conversion error: Invalid property key in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with P1013 error with invalid url provider with --file --url', async () => { ctx.fixture('schema-only-sqlserver') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse(['--url=invalidurl', '--file=./script.sql']) } catch (e) { expect(e.code).toEqual('P1013') expect(e.message).toMatchInlineSnapshot(` P1013 The provided database string is invalid. \`invalidurl\` is not a known connection URL scheme. Prisma cannot determine the connector. in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters. `) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with P1001 error with unreachable url with --file --url', async () => { ctx.fixture('schema-only-sqlserver') expect.assertions(2) fs.writeFileSync('script.sql', '-- empty') try { await DbExecute.new().parse([ '--url=sqlserver://doesnotexist:1433;database=tests-migrate;user=SA;password=Pr1sm4_Pr1sm4;trustServerCertificate=true;', '--file=./script.sql', ]) } catch (e) { // It should error with P1001 but code is undefined // Tracked in following issue: // https://github.com/prisma/prisma/issues/11407 expect(e.code).toEqual(undefined) expect(e.message).toMatchInlineSnapshot(` Error creating a database connection. `) } }) // eslint-disable-next-line jest/no-identical-title it('should fail with SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync('script.sql', 'DROP DATABASE "test-doesnotexists";') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` Cannot drop the database 'test-doesnotexists', because it does not exist or you do not have permission. `) }) // eslint-disable-next-line jest/no-identical-title it('should fail with invalid SQL error from database with --file --schema', async () => { ctx.fixture('schema-only-sqlserver') fs.writeFileSync('script.sql', 'ThisisnotSQLitshouldfail') const result = DbExecute.new().parse(['--schema=./prisma/schema.prisma', '--file=./script.sql']) await expect(result).rejects.toThrowErrorMatchingInlineSnapshot(` Could not find stored procedure 'ThisisnotSQLitshouldfail'. `) }) }) })
{ "redpajama_set_name": "RedPajamaGithub" }
39
\section{Introduction} The AB game is a variant of the famous Mastermind game, which has attracted much attention in literature in the longer and recent past. Mastermind leads to a rich source of recreational \cite{Knu76,KL93} and combinatorial open problems \cite{Ch83}. Recently, theoretical results considering the hardness of Mastermind have been presented \cite{DW12,SZ06,Vig12}. On the other hand, there are also many interesting applications of Mastermind, e.g., in cryptography \cite{FL12} and bioinformatics \cite{GET11}. Most research has been done on the expected-case and worst-case behavior of Mastermind strategies, e.g., \cite{CLH07}. In this context also methods from completely different fields have shown to be helpful, e.g., graph partitioning \cite{CLH04} and evolutionary algorithms \cite{GCG09}. Many variants of Mastermind have been considered, e.g., Black-peg Mastermind \cite{Good09,JP11} and static Mastermind \cite{God03}. Another variant of Mastermind is the AB game, which is the topic of this work and which has already been considered in \cite{CL04,HL09}. It is also known as ``bulls and cows'' game. Whereas the most popular version of the AB game is played with $4$ pegs and $10$ colors, the Generalized AB game is played with $p$ pegs and $c$ colors, where $c \ge p$. We denote this game by $\mathit{AB}(p,c)$. Two players are involved in this game, which are called the \emph{codemaker} and the \emph{codebreaker}. In the beginning of the game, the codemaker chooses a secret containing $p$ pegs, each of different color. The codebreaker tries to identify the secret by asking questions which also contain $p$ pegs, each of different color. The codemaker answers the questions using black and white pegs. The number of black pegs informs, how many pegs in the question match pegs in the secret in position and color. The number of white pegs gives the information, how many further pegs in the question match pegs in the secret only in color, but not in position. The goal of the codebreaker is to minimize the number of questions needed to guess the secret. The game ends when a question is answered with $p$ black pegs, where this last question is counted to the total number of asked questions. Note that the only difference to Mastermind is that in the AB game all pegs in both, the secret and the questions must have distinct colors. Generalized Black-peg AB game, denoted as $\mathit{ABB}(p,c)$, is a modification of the AB game, where the answers contain only black pegs. This modification is analogous to the modification of Mastermind to Black-peg Mastermind \cite{JP11}. We denote by $\mathit{ab}(p,c)$ and $\mathit{abb}(p,c)$ the worst case number of questions in the $\mathit{AB}(p,c)$ and $\mathit{ABB}(p,c)$ game, respectively. If the game has $c$ colors, we name the colors using consecutive numbers: $0, 1, \dots, c-1$. Analogously, if the game has $p$ pegs, we name the pegs using consecutive numbers: $0, 1, \dots, p-1$. We denote a question by $\mq{k_0, k_1, \dots, k_{p-1}}$, where the color $k_i$ is asked at position $i$ for $i=0,1,\dots,p-1$. It has been proved in \cite{CL04} that \begin{equation} \label{eq:ab2} \mathit{ab}(2,c) = \lceil c/2 \rceil + 1 = \lfloor (c+1)/2 \rfloor + 1, \quad\textnormal{if $c \ge 2$}. \end{equation} and in \cite{HL09} that \begin{equation} \label{eq:ab3} \mathit{ab}(3,c) = \left\{ \begin{array}{l l} \lfloor c/3 \rfloor + 3, & \textnormal{if $3 \le c \le 7$,}\\ \lfloor (c+1)/3 \rfloor + 3, & \textnormal{if $c \ge 8$.}\\ \end{array} \right. \end{equation} We agree that the above formula is correct. However, we think that the proof given in \cite{HL09} is wrong or at least not complete. In particular, it is not well justified that the state after the \emph{structural reduction} is \emph{as hard as or harder} than the initial state \cite[p. 173, the last par.]{HL09}. We consider the $\mathit{AB}$ game in Section \ref{sec:ab}. We prove equations (\ref{eq:ab2}) and (\ref{eq:ab3}) independently using the approach introduced in \cite{JP09} and then extended in \cite{JP11} (see Sections \ref{sec:ab2} and \ref{sec:ab3}). Compared to \cite{CL04} and \cite{HL09}, where different methods are proposed, our proof benefits from the same auxiliary results (see Section \ref{sec:abaux}). Furthermore, it is much simpler and only needs to check some values received by a computer program. Moreover, our approach allows us to give in Section \ref{sec:ab4} a similar result for four pegs, namely Theorem~\ref{thm:ab4}. \begin{theorem}\label{thm:ab4} It holds: {\setlength\arraycolsep{1.7pt} \begin{eqnarray} \label{eq:ab4eq}\mathit{ab}(4,c) & = & \left\{ \begin{array}{ll} \lfloor (c+2)/3 \rfloor + 3, & \textnormal{if $4 \le c \le 11$},\\ 8 , & \textnormal{if $c = 12,13$},\\ \end{array} \right. \\[\parskip] \label{eq:ab4lower}\mathit{ab}(4,c) & \ge & \lfloor (c+3)/4 \rfloor + 4, \quad\textnormal{if $c \ge 14$}, \\[\parskip] \label{eq:ab4upper}\mathit{ab}(4,c) & \le & \lfloor (c+3)/4 \rfloor + 5, \quad\textnormal{if $c \ge 14$}. \end{eqnarray}} \end{theorem} We close Section \ref{sec:ab} with some considerations about the value of $\mathit{ab}(p,p)$ in Section \ref{sec:abeq}. The whole Section \ref{sec:abb} is devoted to the lower and upper bounds for the worst case number of questions in the $\mathit{ABB}$ game. We receive Theorem \ref{thm:abb}. \begin{theorem}\label{thm:abb} It holds: {\setlength\arraycolsep{1.7pt} \begin{eqnarray} \label{eq:abb2}\mathit{abb}(2,c) & = & c, \phantom{\null+1}\quad \textnormal{if $c \ge 2$},\\[\parskip] \label{eq:abb3}\mathit{abb}(3,c) & = & c+1, \quad \textnormal{if $c \ge 3$},\\[\parskip] \label{eq:abb4lower}\mathit{abb}(4,c) & \ge & c+1, \quad \textnormal{if $c \ge 4$},\\[\parskip] \label{eq:abb4upper}\mathit{abb}(4,c) & \le & \left\{ \begin{array}{ll} c+1, & \textnormal{if $4 \le c \le 10$},\\ c+2, & \textnormal{if $c \ge 11$}.\\ \end{array} \right. \end{eqnarray}} \end{theorem} The results presented in this paper are obtained with the help of a computer program, which is a modification of the program used in our previous papers about Mastermind \cite{JP09, JP11}. A compressed archive with the complete source code of the program and scripts for reproducing all computations can be downloaded from \cite{ABcode}. \section{AB Game with White Pegs in Answers}\label{sec:ab} We verified equations (\ref{eq:ab2}) and (\ref{eq:ab3}) for $c\le13$, using the computer program. Additionally, we computed the values for $p=4$. The results are presented in Table \ref{tbl:ab}. We have adapted the approach introduced in \cite{JP09} and extended in \cite{JP11} to obtain formulas for an arbitrary number of colors. As previously, we introduce two auxiliary games: $\mathit{AB}_*$ and $\mathit{AB}^*$. \begin{table}[htb] \caption{Computed values $\mathit{ab}(p,c)$ for $2 \le p \le 4$ and $p \le c \le 13$} \label{tbl:ab} \begin{center} \begin{tabular}{|cc|*{12}{r}|} \hline &&\multicolumn{12}{c|}{$c$}\\ & & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &10 &11 &12 &13 \\ \hline \multirow{3}{0.5em}{$p$} & 2 & 2 & 3 & 3 & 4 & 4 & 5 & 5 & 6 & 6 & 7 & 7 & 8 \\ & 3 & & 4 & 4 & 4 & 5 & 5 & 6 & 6 & 6 & 7 & 7 & 7 \\ & 4 & & & 5 & 5 & 5 & 6 & 6 & 6 & 7 & 7 & 8 & 8 \\ \hline \end{tabular} \end{center} \end{table} The $\mathit{AB}_*(p,c)$ game is the $\mathit{AB}(p,c)$ game in which an additional color $c$ in questions is allowed. Note that the additional color cannot appear in a secret and that the additional color can appear in a question more than twice, but all other ``normal'' colors only once. As asking a question containing $p$ times the additional color does not makes any sense, we do not need to consider such questions in the computer program. The $\mathit{AB}^*(p,c,x)$ game, where $x \in \mathbb{N}_0$ with $px \le c$, is the $\mathit{AB}(p,c)$ game, where the beginning $x$ questions are fixed, namely question $k$ is $\mql{pk}, pk+1, $ $ \dots, \mqr{pk+p-1}$ for $k=0,1,\dots,x-1$. Note that the $\mathit{AB}^*(p,c,0)$ game is equivalent to the $\mathit{AB}(p,c)$ game. We denote by $\mathit{ab}_*(p,c)$ and $\mathit{ab}^*(p,c,x)$ the worst case number of questions in the $\mathit{AB}_*(p,c)$ and $\mathit{AB}^*(p,c,x)$ game, respectively. \subsection{Auxiliary Results}\label{sec:abaux} Every strategy for $\mathit{AB}(p,c)$ using at most $q$ questions allows to win $\mathit{AB}_*(p,c)$ using also at most $q$ questions. Hence, we have $\mathit{ab}(p,c) \ge \mathit{ab}_*(p,c)$. We can easily transform a strategy for $\mathit{AB}_*(p,c+1)$ into a strategy for $\mathit{AB}_*(p,c)$ by changing the additional color $c+1$ of the $\mathit{AB}_*(p,c+1)$ game into the color $c$ which is unused in secrets of the $\mathit{AB}_*(p,c)$ game and plays the role of an additional color in $\mathit{AB}_*(p,c)$. Hence, $\mathit{ab}_*(p,c+1) \ge \mathit{ab}_*(p,c)$. If we ask the first question containing $m \le p$ ``normal'' colors in the $\mathit{AB}_*(p,c)$ game and the adversary gives us the empty answer, we are forced to play the $\mathit{AB}_*(p,c-m)$ game. Hence, we have \begin{displaymath} \mathit{ab}_*(p,c) \ge 1+\min_{1 \le m \le p} \mathit{ab}_*(p,c-m) = 1+\mathit{ab}_*(p,c-p). \end{displaymath} Consequently for $c \ge c_0$ we have \begin{equation} \label{eq:ablowerbound} \mathit{ab}(p,c) \ge \lfloor (c-c_0)/p \rfloor + \mathit{ab}_*(p,c_0). \end{equation} On the other hand, every strategy for $\mathit{AB}^*(p,c,x)$ is a proper strategy for $\mathit{AB}(p,c)$. Hence, we have $\mathit{ab}(p,c) \le \mathit{ab}^*(p,c,x)$. Now, let the number of colors be $c=px+m$, where $x \ge p$ and $m\in\mathbb{N}_0$. We consider a strategy for the $\mathit{AB}^*(p,px+m,x)$ game. There are at least $x-p$ empty answers among the first $x$ questions which discard $(x-p)p$ colors. Hence, the game is reduced to the $\mathit{AB}^*(p,p^2+m,p)$ game and we have \begin{equation} \label{eq:abupperbound} \mathit{ab}(p,px+m) \le \mathit{ab}^*(p,px+m,x) \le x-p + \mathit{ab}^*(p,p^2+m,p). \end{equation} In the following subsections we combine the inequalities (\ref{eq:ablowerbound}), (\ref{eq:abupperbound}) with computed values to obtain lower and upper bounds for the worst case number of questions in the $\mathit{AB}(p,c)$ game for a fixed number of pegs and an arbitrary number of colors. \subsection{Two Pegs}\label{sec:ab2} For two pegs the computer program yields $\mathit{ab}_*(2,3)=3$ and $\mathit{ab}^*(2,5,2)=\mathit{ab}^*(2,6,2)=4$. Using equation (\ref{eq:ablowerbound}) for $c_0=3$, we receive for $c \ge 3$ that \begin{displaymath} \mathit{ab}(2,c) \ge \lfloor(c-3)/2\rfloor + 3 =\lfloor(c+1)/2\rfloor + 1. \end{displaymath} Moreover, by equation (\ref{eq:abupperbound}), for $x \ge 2$ and $m=1,2$ we have \begin{displaymath} \mathit{ab}(2,2x+m) \le x-2 + \mathit{ab}^*(2,4+m,2) = x+2, \end{displaymath} which implies for $c \ge 5$ that it holds \begin{displaymath} \mathit{ab}(2,c) \le \lfloor (c+1)/2 \rfloor + 1. \end{displaymath} The above inequalities together with the values from Table \ref{tbl:ab} confirm equation (\ref{eq:ab2}). \subsection{Three Pegs}\label{sec:ab3} For three pegs the computer program yields $\mathit{ab}_*(3,8)=6$ and $\mathit{ab}^*(3,14,3)=\mathit{ab}^*(3,15,3)=\mathit{ab}^*(3,16,3)=8$. Using equation (\ref{eq:ablowerbound}) for $ c_0=8$, we receive for $c \ge 8$ that \begin{displaymath} \mathit{ab}(3,c) \ge \lfloor(c-8)/3\rfloor + 6 = \lfloor(c+1)/3\rfloor + 3. \end{displaymath} Moreover, by equation (\ref{eq:abupperbound}), for $x \ge 3$ and $m=5,6,7$ we have \begin{displaymath} \mathit{ab}(3,3x+m) \le x-3 + \mathit{ab}^*(3,9+m,3) = x+5, \end{displaymath} which implies for $c \ge 14$ that it holds \begin{displaymath} \mathit{ab}(3,c) \le \lfloor (c+1)/3 \rfloor + 3. \end{displaymath} The above inequalities together with the values from Table \ref{tbl:ab} confirm equation (\ref{eq:ab3}). \subsection{Four Pegs}\label{sec:ab4} For $p=4$ we cannot give an exact formula, but we present close lower and upper bounds, where the gap between the bounds does not exceed one question. The program yields $\mathit{ab}_*(4,13) \ge 8$. Using equation (\ref{eq:ablowerbound}) for $c_0=13$, we receive for $c \ge 13$ that \begin{displaymath} \mathit{ab}(4,c) \ge \lfloor(c-13)/4\rfloor + 8 = \lfloor(c+3)/4\rfloor + 4, \end{displaymath} which confirms inequality (\ref{eq:ab4lower}). By the computer program, $\mathit{ab}^*(4,17,4) \le 10$, $\mathit{ab}^*(4,18,4) \le 10$, $\mathit{ab}^*(4,19,4) \le 10$, $\mathit{ab}^*(4,20,4) \le 10$ hold. Note that in these cases we do not know the exact values, but only upper bounds. Using equation (\ref{eq:abupperbound}) for $x \ge 4$ and $m=1,2,3,4$ we have \begin{displaymath} \mathit{ab}(4,4x+m) \le x-4 + \mathit{ab}^*(4,16+m,4) \le x+6, \end{displaymath} which implies that it holds for $c \ge 17$ \begin{displaymath} \mathit{ab}(4,c) \le \lfloor (c-1)/4 \rfloor + 6 = \lfloor (c+3)/4 \rfloor + 5. \end{displaymath} We computed directly upper bounds for the three missing values, namely 14, 15 and 16 colors. The program returned the bounds $\mathit{ab}(4,14) \le 9$, $\mathit{ab}(4,15) \le 9$ and $\mathit{ab}(4,16) \le 9$. This closes the proof of inequality (\ref{eq:ab4upper}). Table~\ref{tbl:ab} contains the values up to 13 colors, which confirms equation (\ref{eq:ab4eq}). \subsection{Equal Number of Pegs and Colors}\label{sec:abeq} The games $\mathit{AB}(p,p)$ and $\mathit{ABB}(p,p)$ are equivalent, as the equality $p=c$ implies $b+w=p$, where $b$ is the number of black pegs in the answer and $w$ is the number of white pegs in the answer. Hence, if the number of colors is equal to the number of pegs, $w$ is uniquely determined by $b$. Therefore, it holds $\mathit{ab}(p,p) = \mathit{abb}(p,p)$, which is the motivation to consider the only-black-peg version of the game. The lower bound $\mathit{ab}(p,p) = \Omega(p)$ has been proved in \cite{KT86}. This result can be reformulated as follows. We have $p!$ possible secrets. There are $c$ possible answers to each question, namely the number of black pegs could be $0$, $1$, $2$, $\dots$, $p-2$, $p$. Note that the answer $p-1$ black pegs is not possible. As the answer $p$ black pegs finishes the game, for every question we have at most $p-1$ possible continuations of the game. Therefore, if $p>2$ and we ask $q$ questions, we can solve at most \begin{displaymath} T(p,q) = \sum_{i=0}^{q-1}(p-1)^i = \frac{(p-1)^q-1}{p-2} < p^q \end{displaymath} secrets and it must hold $p! \le T(p,q)$. Note that $T(2,q)=q$. Using Stirling's approximation $p! > (p/e)^p$, we obtain an asymptotic lower bound \begin{displaymath} \mathit{ab}(p,p) > p\left(1-\frac{1}{\ln p}\right). \end{displaymath} \begin{table}[htb] \caption{Computed values for $2 \le p \le 6$} \label{tbl:abpp} \begin{center} \begin{tabular}{|c|*{5}{r}|} \hline $p$ & 2 & 3 & 4 & 5 & 6 \\ \hline $\mathit{ab}(p,p)$ & 2 & 4 & 5 & 6 & 7 \\ \hline $q_{\min}(p)$ & 2 & 3 & 4 & 5 & 5 \\ \hline \end{tabular} \end{center} \end{table} The upper bound $\mathit{ab}(p,p) = O(p \log p)$ has been shown in \cite{KT86}. Table~\ref{tbl:abpp} contains exact values for $\mathit{ab}(p,p)$, computed by the program, in the second row. The last row contains the smallest value of $q$ satisfying the inequality $p! \le T(p,q)$, which gives a lower bound for $\mathit{ab}(p,p)$. \section{AB Game without White Pegs in Answers}\label{sec:abb} \subsection{Lower Bounds} We prove lower bounds of the $\mathit{ABB}(p,c)$ game by showing a counterstrategy for the codemaker. The counterstrategy is parametrized with two numbers $q,r\in\mathbb{N}$, where $r \ge p$ and these parameters depend on $p$, but not on $c$. The counterstrategy starts with the initial phase, where the codemaker answers the first $c-r$ questions with zero black pegs. This strategy is valid, as after that at each peg position there are at least $r$ possible colors. If the codemaker chooses an arbitrary color for the first peg, and an arbitrary unused color for the following pegs, then this process leads to a possible secret which would receive the answer of zero black pegs in the $c-r$ questions. On the other hand, it is not always possible for the codemaker to answer the first $c-p+1$ (or more) questions with zero black pegs. This can be seen by the following example. \case{Example} Consider the game $\mathit{ABB}(4,7)$, and let the codebreaker ask the $c-p+1=4$ questions: $\mq{0,1,2,3}$, $\mq{1,2,3,0}$, $\mq{2,3,0,1} $, $\mq{3,0,1,2}$. If the codemaker would answer all these questions with zero black pegs, then the only possible colors for a secret would be $4$, $5$, $6$, but no secret exists with $4$ pegs and only $3$ different colors. After the initial phase an end-game is played, where the goal of the codemaker is to force the codebreaker to ask more than $q$ questions. To ease the analysis of the end-game, we transform the set of possible secrets, but we define only transformation rules which do not increase the worst case number of questions in the end-game. As some transformation rules change colors, they also affect the set of questions. To overcome this problem, we extend the set of allowed questions. The codebreaker is not restricted to ask only questions with distinct colors in the end-game. Although extending the set of questions could decrease the worst case number of questions required to win the end-game, by choosing a suitable value of the counterstrategy parameter $r$ we receive the desired tight lower bounds. After answering the $c-r$ questions with zero black pegs, some colors are excluded from being present at some positions in the secret. For every peg position, we consider a set of possible colors for that position. The cardinality of that set is at least $r$. The sequence of such sets for all positions is called an \emph{end-game state} or simply a \emph{state} for short. We represent the state by a table containing $p$ rows. The row $i$ contains the colors which are still possible at peg position $i$. In the following, we denote for a given color the set of row numbers of the state, where this color appears in, as its \emph{row set}. We denote a row set of cardinality $1$, $2$, $3$ or $4$ as \emph{single row set}, \emph{pair row set}, \emph{triple row set} and \emph{quadruple row set}, respectively. Below we formally write all state transformation rules. An application example is shown in Figure \ref{fig:abbl:rulesex}. \subcase{Rule 1} Any color can be removed from any row. \subcase{Rule 2} Colors can be permuted. \subcase{Rule 3} Rows can be permuted. \subcase{Rule 4} If the colors $k_1$ and $k_2$ have disjoint row sets, then the color $k_2$ can be replaced by the color $k_1$. \begin{figure}[t] \begin{center} \begin{displaymath} \begin{array}{c} \left( \begin{array}{ccccc} 0 & 1 & 2 & 3 & \\ 4 & 5 & 6 & 7 & 8 \\ 9 & 10 & 11 & 12 & \\ \end{array} \right) \mathrel{\mathop{\kern0pt{\hbox to40pt{\rightarrowfill}}} \limits^{\textnormal{Rule 1}}} \left( \begin{array}{cccc} 0 & 1 & 2 & 3 \\ 4 & 5 & 6 & 7 \\ 9 & 10 & 11 & 12 \\ \end{array} \right) \mathrel{\mathop{\kern0pt{\hbox to40pt{\rightarrowfill}}} \limits^{\textnormal{Rule 2}}} \\[1cm] \left( \begin{array}{cccc} 0 & 1 & 2 & 3 \\ 4 & 5 & 6 & 7 \\ 8 & 9 & 10 & 11 \\ \end{array} \right) \mathrel{\mathop{\kern0pt{\hbox to40pt{\rightarrowfill}}} \limits^{\textnormal{Rule 4}} \limits_{\substack{ k_1=0 \\ k_2=4 }}} \left( \begin{array}{cccc} 0 & 1 & 2 & 3 \\ 0 & 5 & 6 & 7 \\ 8 & 9 & 10 & 11 \\ \end{array} \right) \mathrel{\mathop{\kern0pt{\hbox to40pt{\rightarrowfill}}} \limits^{\textnormal{Rule 4}} \limits_{\substack{ k_1=0 \\ k_2=8 }}} \\[1cm] \left( \begin{array}{cccc} 0 & 1 & 2 & 3 \\ 0 & 5 & 6 & 7 \\ 0 & 9 & 10 & 11 \\ \end{array} \right) \mathrel{\mathop{\kern0pt{\hbox to40pt{\rightarrowfill}}} \limits^{\textnormal{Rule 4}}} \cdots \mathrel{\mathop{\kern0pt{\hbox to40pt{\rightarrowfill}}} \limits^{\textnormal{Rule 4}}} \left( \begin{array}{cccc} 0 & 1 & 2 & 3 \\ 0 & 1 & 2 & 3 \\ 0 & 1 & 2 & 3 \\ \end{array} \right) \end{array} \end{displaymath} \caption{Rule application example for $p=3$} \label{fig:abbl:rulesex} \end{center} \end{figure} Rule 1 is correct, as the set of possible secrets is not increased by omitting a color for a fixed peg. However, we cannot remove too many colors, because this would result in decreasing the worst case number of questions. It is also clear that Rules 2 and 3 are correct, as they do not change the worst case number of questions. The proof of Rule 4 is more complicated. Let $S_1$ and $S_2$ be states before and after applying Rule 4, respectively, and let $R_1$ and $R_2$ be the row sets of the colors $k_1$ and $k_2$, respectively. We need to show the implication that if the codebreaker can win $S_1$ in $q$ questions, then he or she can win $S_2$ also in $q$ questions. Let the codebreaker have a $q$-question winning strategy $X_1$ for $S_1$. We construct a strategy $X_2$ allowing the codebreaker to win $S_2$ in $q$ questions. We replace in $X_1$ the color $k_2$ by the color $k_1$ in all secrets. We exchange in $X_1$ the colors $k_1$ and $k_2$ in all questions, but only at positions which are in the row set $R_2$. The assumption that the row sets $R_1$ and $R_2$ are disjoint is important, because it implies that the secret distinctness is preserved and then answers are preserved. Formally, if in $X_1$ the question $q_1$ answers the secret $s_1$ with $b$ black pegs, $q_1$ is mapped to $q_2$, and $s_1$ is mapped to $s_2$, then in $X_2$ the question $q_2$ answers the secret $s_2$ also with $b$ black pegs. The questions in $X_2$ remain valid, because we allowed the codebreaker to ask all combinations of colors. Some secrets, namely those containing the colors $k_1$ and $k_2$ in $S_1$, become not valid in $S_2$, because in $S_2$ they contain two times the color $k_1$. This causes no problems, as by omitting these secrets the worst case number of questions can only become smaller, but not larger. Finally, the transformation described by Rule 4 is an onto function, i.e., if $s_2$ is a valid secret in $S_2$, then there must be a valid secret $s_1$ in $S_1$, such that Rule 4 maps $s_1$ to $s_2$. Now, to prove the lower bound for a given $p$, we consider all possible states and we apply the above rules to them. The goal is to reduce all states to a small set of non-reducible ones. The number of these states and the states itself must not depend on $c$. We leave exactly $r$ colors for each row, using Rule 1. After that we eliminate all disjoint row sets by Rule 4. As all rows contain the same number of colors, this will also eliminate all single row sets. Because of Rule 2, we can assume that the state contains exactly the colors $0$, $1$, $\dots$, $c_0$. Rule 3 is used to throw out isomorphic states. As the colors $c_0+1$, $c_0+2$, $\dots$, $c-1$ cannot appear in the secret, we can replace all of them by $c_0+1$ (here we assume that $c_0+1 \le c-1$). In other words, we need to consider only $c_0+2$ colors in questions, namely the colors $0$, $1$, $2$, $\dots$, $c_0+1$, where the number $c_0$ does not depend on $c$, because $c_0<pr$. This allows us to solve the end-game by the computer program. We check whether all non-reducible states can be finished in $q$ questions. If the result is negative, we have the lower bound $\mathit{abb}(p,c)>c-r+q$. The above considerations are taken under the assumption that the number of colors is sufficiently large. We require that $c$ is the maximum number of colors used in all checked states, i.e., the maximum over the values of $c_0+2$ in all states. As we will see later, for a smaller number of colors some states are impossible. This does not invalidate the lower bound. Moreover, if we prove a lower bound for a given state and $c_0+2$ colors, then the lower bound also holds for the state, when the codebreaker has less than $c_0+2$ colors. Therefore, we conclude that the lower bound holds for all $c \ge r$. \begin{figure}[t] \begin{center} \begin{displaymath} A_1=\left( \begin{array}{ccccc} 0 & 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 3 & 4 \\ \end{array} \right)\quad A_2=\left( \begin{array}{cccccc} 0 & 1 & 2 & 3 & 4 & \\ 0 & 1 & 2 & 3 & & 5 \\ 0 & 1 & 2 & & 4 & 5 \\ \end{array} \right) \end{displaymath} \begin{displaymath} A_3=\left( \begin{array}{ccccccc} 0 & 1 & 2 & 3 & 4 & & \\ 0 & 1 & 2 & & & 5 & 6 \\ 0 & & & 3 & 4 & 5 & 6 \\ \end{array} \right) \end{displaymath} \caption{The non-reducible states for $p=3$} \label{fig:abbl:states3} \end{center} \end{figure} \subsubsection{Two Pegs} For $p=2$ we choose $q=1$ and $r=2$. After applying Rule 1, each row of the state contains $2$ colors. As $2$ colors with disjoint single row sets can be merged into $1$ color by Rule 4, we only have pair row sets. By applying Rule 2, all states are reducible to the single state $\bigl( \begin{smallmatrix} 0 & 1 \\ 0 & 1 \\ \end{smallmatrix} \bigr)$. As the state has $2$ secrets, the end-game cannot be won in $1$ question, which implies the lower bound $\mathit{abb}(2,c)>c-r+q=c-1$ for $c\ge2$. Therefore, we have shown the inequality ``$\ge$'' in equation (\ref{eq:abb2}). \begin{figure}[t] \begin{center} \begin{displaymath} \begin{array}{cc} B_1=\left( \begin{array}{ccccc} 0 & 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 3 & 4 \\ \end{array} \right) & B_2=\left( \begin{array}{cccccc} 0 & 1 & 2 & 3 & 4 & \\ 0 & 1 & 2 & 3 & 4 & \\ 0 & 1 & 2 & 3 & & 5 \\ 0 & 1 & 2 & & 4 & 5 \\ \end{array} \right) \\[1cm] B_3=\left( \begin{array}{ccccccc} 0 & 1 & 2 & 3 & 4 & & \\ 0 & 1 & 2 & 3 & & 5 & \\ 0 & 1 & 2 & 3 & & & 6 \\ 0 & 1 & & & 4 & 5 & 6 \\ \end{array} \right) & B_4=\left( \begin{array}{cccccc} 0 & 1 & 2 & 3 & 4 & \\ 0 & 1 & 2 & 3 & & 5 \\ 0 & 1 & 2 & & 4 & 5 \\ 0 & 1 & & 3 & 4 & 5 \\ \end{array} \right) \\[1cm] B_5=\left( \begin{array}{ccccccc} 0 & 1 & 2 & 3 & 4 & & \\ 0 & 1 & 2 & 3 & 4 & & \\ 0 & 1 & 2 & & & 5 & 6 \\ 0 & & & 3 & 4 & 5 & 6 \\ \end{array} \right) & B_6=\left( \begin{array}{ccccccc} 0 & 1 & 2 & 3 & 4 & & \\ 0 & 1 & 2 & 3 & & 5 & \\ 0 & 1 & 2 & & 4 & & 6 \\ 0 & & & 3 & 4 & 5 & 6 \\ \end{array} \right) \\[1cm] B_7=\left( \begin{array}{cccccccc} 0 & 1 & 2 & 3 & 4 & & & \\ 0 & 1 & 2 & 3 & & 5 & & \\ 0 & 1 & 2 & & & & 6 & 7 \\ & & & 3 & 4 & 5 & 6 & 7 \\ \end{array} \right) & B_8=\left( \begin{array}{ccccccc} 0 & 1 & 2 & 3 & 4 & & \\ 0 & 1 & 2 & 3 & & 5 & \\ 0 & 1 & & & 4 & 5 & 6 \\ & & 2 & 3 & 4 & 5 & 6 \\ \end{array} \right) \\[\parskip] \end{array} \end{displaymath} \caption{The non-reducible states for $p=4$} \label{fig:abbl:states4} \end{center} \end{figure} \subsubsection{Three Pegs} For $p=3$ we choose $q=r=5$. In the following, we will show that all states are reducible to the only $3$ ones which are shown in Figure \ref{fig:abbl:states3}. After applying Rule 1, each row of the state contains $5$ colors. After that, if the state contains a single row set, then it must contain another row set which is disjoint with it. These row sets can be merged by Rule 4. Hence in the following, we assume that the state does not contain single row sets and the state table contains exactly $15$ elements. We consider four cases distinguishing the number of triple row sets in the state. \begin{itemize} \item An even number of colors has a triple row set. Then there is an odd number of remaining elements in the state table. This would mean that $1$ color has a single row set, and we have a contradiction. \item $5$ colors have a triple row set. Then after applying Rule 2, we receive table $A_1$ of Figure~\ref{fig:abbl:states3}. \item $3$ colors have a triple row set. There are $6$ remaining elements in the state table. There must be $3$ colors, each having a pair row set. By applying Rules 2 and 3, we receive table $A_2$ of Figure \ref{fig:abbl:states3}. \item $1$ color has a triple row set. There are $12$ remaining elements in the state table. There must be $6$ colors, each having a pair row set. By applying Rules 2 and 3, we receive table $A_3$ of Figure~\ref{fig:abbl:states3}. \end{itemize} The computer experiment shows that neither of the states $A_1$, $A_2$ and $A_3$ can be solved in $5$ questions, which yields $\mathit{abb}(3,c)>c-r+q=c$ for $c \ge 5$. Note that for smaller values of $c$, some states are impossible in the end-game. Only $A_1$ appears for $c=5$, only $A_2$ for $c=6$, but for $c \ge 7$ all three states could appear. The same lower bound for $3 \le c \le 4$ is quite easy to check directly by the computer program. Hence, we have shown the inequality ``$\ge$'' in equation~(\ref{eq:abb3}). \subsubsection{Four Pegs} For $p=4$ we also choose $q=r=5$. We will show that all states are reducible to the only $8$ ones which are shown in Figure \ref{fig:abbl:states4}. First, we apply Rule 1 so that each row of the state contains exactly $5$ colors. Next, we apply Rule 4 as long as all disjoint row sets are eliminated. Among others this eliminates all single row sets. The following observation is easy to see. \case{Observation} Consider a state containing only $n$ pairwise non-disjoint pair row sets. Then there exists an empty row or a row containing $n$ different colors. Patterns of pairwise non-disjoint pair row sets are shown in Figure \ref{fig:abbl:patterns2}. \begin{figure}[t] \begin{center} \begin{displaymath} P_1=\left( \begin{array}{c} \\ \\ 0 \\ 0 \\ \end{array} \right)\quad P_2=\left( \begin{array}{cc} & \\ 0 & \\ & 1 \\ 0 & 1 \\ \end{array} \right)\quad P_3=\left( \begin{array}{ccc} & & \\ 0 & & 2 \\ & 1 & 2 \\ 0 & 1 & \\ \end{array} \right)\quad P_4=\left( \begin{array}{ccc} 0 & & \\ & 1 & \\ & & 2 \\ 0 & 1 & 2 \\ \end{array} \right) \end{displaymath} \caption{States with pairwise non-disjoint pair row sets} \label{fig:abbl:patterns2} \end{center} \end{figure} The observation implies that a state contains at most $4$ colors with a pair row set, which can be seen as follows. Assume that a state contains more than $4$ colors with a pair row set. The state table contains $20$ elements. Thus it contains $1$ color with a quadruple row set and $2$ colors with a triple row set, or $2$ colors with a quadruple row set, or $2$ colors with a triple row sets, or $1$ color with a quadruple row set, or no other colors. Then there exists a row with at most $3$ colors or at least $6$ colors, which is a contradiction. The observation also implies that if a state contains the same number of colors in each row and a color with a pair row set, it must also contain a color with a triple row set. We consider six cases distinguishing the number of quadruple row sets. \begin{itemize} \item $5$ colors have a quadruple row set. Then after applying Rule 2, we receive table $B_1$ of Figure~\ref{fig:abbl:states4}. \item $4$ colors have a quadruple row set. There are $4$ remaining elements in the state table. This means that $2$ disjoint pair row sets exist, which is a contradiction. \item $3$ colors have a quadruple row set. There are $8$ remaining elements in the state table. By the second conclusion of the observation, $2$ colors have a triple row set and $1$ color has a pair row set. The triple row sets are distinct, as otherwise one row would contain $6$ colors. By applying Rules 2 and 3, we receive table $B_2$ of Figure \ref{fig:abbl:states4}. \item $2$ colors have a quadruple row set. There are $12$ remaining elements in the state table. By the first conclusion of the observation, we have two sub-cases. \begin{itemize} \item $2$ colors have a triple row set and $3$ colors have a pair row set. If the triple row sets are distinct, then there exists a row with at most $4$ colors or at least $6$ colors. Therefore, the triple row sets must be equal. By applying Rules 2 and 3, we receive table $B_3$ of Figure \ref{fig:abbl:states4}. \item $4$ colors have a triple row set. All triple row sets are distinct, as otherwise a row would contain at most $4$ colors. By applying Rules 2 and 3, we receive table $B_4$ of Figure~\ref{fig:abbl:states4}. \end{itemize} \item $1$ color has a quadruple row set. There are $16$ remaining elements in the state table. By the first conclusion of the observation, $4$ colors have a triple row set and $2$ colors have a pair row set. We have to distinguish the relations between the $4$ triple row sets. \begin{itemize} \item There are $4$ different triple row sets. Then there exists a row which contains $4$ or $6$ colors. We have a contradiction. \item There are $3$ equal triple row sets. Then there exists a row which contains at most $4$ colors. We have a contradiction. \item There are exactly $2$ equal triple row sets and $2$ further equal triple row sets. Then by applying Rules 2 and 3, we receive table $B_5$ of Figure \ref{fig:abbl:states4}. \item There are exactly $2$ equal triple row sets and $2$ further different triple row sets. Then by applying Rules 2 and 3, we receive table $B_6$ of Figure~\ref{fig:abbl:states4}. \end{itemize} \item $0$ colors have a quadruple row set. There are $20$ remaining elements in the state table. By the first conclusion of the observation, we have two sub-cases. \begin{itemize} \item $4$ colors have a triple row set and $4$ colors have a pair row set. It is not possible that a row exists which contains no colors of pair row sets, as otherwise this row would contain not more than $4$ colors. By the observation, a row exists which contains $4$ colors of pair row sets. Thus this row contains only $1$ color of triple row sets. This means that $1$ color has a triple row set and further $3$ colors have another equal triple row set. Now, the pair row sets are uniquely determined. By applying Rules 2 and 3, we receive table $B_7$ of Figure \ref{fig:abbl:states4}. \item $6$ colors have a triple row set and $1$ color has a pair row set. We have to distinguish the relations between the $6$ triple row sets. \begin{itemize} \item There are at least $3$ equal triple row sets $R_1$. W.l.o.g., let $R_1=\{0,1,2\}$. Then row $3$ contains at most $4$ colors, which leads to a contradiction. \item There are $2$ equal triple row sets $R_1$, $2$ further equal triple row sets $R_2$, and $2$ further equal triple row sets $R_3$. W.l.o.g., let $R_1=\{0,1,2\}$, $R_2=\{0,1,3\}$, $R_3=\{0,2,3\}$. Then row $0$ contains at least $6$ colors, which leads to a contradiction. \item There are $2$ equal triple row sets $R_1$, $2$ further equal triple row sets $R_2$, and $2$ further different triple row sets $R_3$, $R_4$. W.l.o.g., let $R_1=\{0,1,2\}$, $R_2=\{0,1,3\}$, $R_3=\{0,2,3\}$, $R_4=\{1,2,3\}$. Then the pair row set of the remaining color is uniquely determined as $\{2,3\}$. By applying Rules 2 and 3, we receive table $B_8$ of Figure \ref{fig:abbl:states4}. \end{itemize} \end{itemize} \end{itemize} The computer experiment shows that neither of the states $B_1$, $B_2$, $\dots$, $B_8$ can be solved in $5$ questions, which yields $\mathit{abb}(4,c)>c-r+q=c$ for $c \ge 5$. Again for smaller values of $c$, some states are impossible, e.g., for $c=7$ state $B_7$ cannot appear. The same lower bound for $c=4$ is quite easy to check directly by the computer program. Hence, we have shown the inequality~(\ref{eq:abb4lower}). \subsection{Upper Bounds} We prove upper bounds of the $\mathit{ABB}(p,c)$ game by showing a strategy for the codebreaker. Questions of the following form will play a major role in the strategy: \begin{displaymath} \mq{k \bmod c, \; k+1 \bmod c, \; \dots, \; k+p-1 \bmod c} \end{displaymath} for a given $k \in \mathbb{N} $ (not necessarily in $\{0,1,\dots,c-1\}$). We will denote such a question by $\mq{k}$ for short. The strategy consists of two phases: the reduction and the end-game. \case{The reduction} The codebreaker starts with the question $\mq{0}$ and asks totally at most $x$ questions. He or she follows three rules. \subcase{Rule 1} If the codemaker answers with $p$ black pegs, the game is finished. \subcase{Rule 2} As long as the codemaker answers with zero black pegs, the codebreaker continues with consecutive questions in decreasing order: $\mq{c-1}$, $\mq{c-2}$, $\mq{c-3}$, etc. \subcase{Rule 3} If question $\mq{k}$ is the first one answered with $b$ black pegs, where $1 \le b \le p-1$, the codebreaker begins to ask questions in increasing order, i.e., instead of asking $\mq{k-1}$, he or she asks questions $\mq{1}$, $\mq{2}$, etc., as next. \case{The end-game} After the $x$ questions of the reduction phase, if the game has not yet been finished, the codebreaker plays using all possible questions. This two phase strategy is based on three ideas. First, for a given fixed number of pegs all end-games with an arbitrary large number of colors can be reduced to an end-game with a finite and small number of colors. Second, the end-game can be effectively solved by a variant of the computer program. Third, the Rule 3 is substantial. Without it the tight upper bound cannot be obtained. \begin{figure}[t] \begin{center} \begin{displaymath} \begin{array}{c} (0,1) \mapsto 0 \\ (6,0) \mapsto 0 \\ (5,6) \mapsto 0 \\ (4,5) \mapsto 0 \\ (3,4) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{question reorder}}} \begin{array}{c} (3,4) \mapsto 0 \\ (4,5) \mapsto 0 \\ (5,6) \mapsto 0 \\ (6,0) \mapsto 0 \\ (0,1) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{color permutation}} \limits_{k\;\mapsto\,(k-3)\bmod7}} \begin{array}{c} (0,1) \mapsto 0 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ (3,4) \mapsto 0 \\ (4,5) \mapsto 0 \\ \end{array} \end{displaymath} \begin{displaymath} \begin{array}{c} (0,1) \mapsto 0 \\ (6,0) \mapsto 0 \\ (5,6) \mapsto 1 \\ (1,2) \mapsto 1 \\ (2,3) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{question reorder}}} \begin{array}{c} (5,6) \mapsto 1 \\ (6,0) \mapsto 0 \\ (0,1) \mapsto 0 \\ (1,2) \mapsto 1 \\ (2,3) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{color permutation}} \limits_{k\;\mapsto\,(k-5)\bmod7}} \begin{array}{c} (0,1) \mapsto 1 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ (3,4) \mapsto 1 \\ (4,5) \mapsto 0 \\ \end{array} \end{displaymath} \caption{Game state examples for $p=2$, $c=7$, $x=5$} \label{fig:abbu:reduct_upp} \end{center} \end{figure} \begin{figure}[t] \begin{center} \begin{displaymath} \begin{array}{c} (0,1) \mapsto 0 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ (3,4) \mapsto 0 \\ (4,5) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{color mapping}} \limits_{\substack{ 0 \;\mapsto\, 0 \\ 5 \;\mapsto\, 3 \\ 6 \;\mapsto\, 4 }}} \begin{array}{c} (0,1) \mapsto 0 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ \end{array} \end{displaymath} \begin{displaymath} \begin{array}{c} (0,1) \mapsto 1 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ (3,4) \mapsto 0 \\ (4,5) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{color mapping}} \limits_{\substack{ 0 \;\mapsto\, 0 \\ 1 \;\mapsto\, 1 \\ 5 \;\mapsto\, 3 \\ 6 \;\mapsto\, 4 }}} \begin{array}{c} (0,1) \mapsto 1 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ \end{array} \end{displaymath} \begin{displaymath} \begin{array}{c} (0,1) \mapsto 1 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 0 \\ (3,4) \mapsto 1 \\ (4,5) \mapsto 0 \\ \end{array} \mathrel{\mathop{\kern0pt{\hbox to80pt{\rightarrowfill}}} \limits^{\textnormal{color mapping}} \limits_{\substack{ 0 \;\mapsto\, 0 \\ 1 \;\mapsto\, 1 \\ 3 \;\mapsto\, 2 \\ 4 \;\mapsto\, 3 }}} \begin{array}{c} (0,1) \mapsto 1 \\ (1,2) \mapsto 0 \\ (2,3) \mapsto 1 \\ \end{array} \end{displaymath} \caption{Color mapping examples for $p=2$, $c_1=7$, $x_1=5$, $c_0=5$, $x_0=3$} \label{fig:abbu:mapping} \end{center} \end{figure} The state of the game after the reduction phase is uniquely determined by the set of pairs ``question---answer'', where the order of the questions is not important. Moreover, if we permute the colors, the worst case number of questions remains unchanged. In our case, it suffices to rotate the colors. Hence, we can restrict our considerations to the sequence of questions $\mq{0}, \mq{1}, \dots, \mq{x-1}$, where either all answers are zero black pegs or the first asked question $\mq{0}$ is answered with at least one black peg. Two examples are shown in Figure \ref{fig:abbu:reduct_upp}. In the top example, all questions are answered with zero black pegs. In the bottom example, some questions are answered with a non-zero number of black pegs. Observe that in the reduction phase, if the number of colors is large, the most questions are answered with zero black pegs. In fact, only at most $p$ questions can get another answer. As a color used at a given position in a question answered with zero black pegs cannot appear at this position in the secret, after the reduction phase the most colors are excluded from being in the secret. \begin{figure}[t] \begin{center} \begin{displaymath} \begin{array}{ccc} (0,0,0,0,0,0,0) & (1,0,0,0,0,0,0) & (2,0,0,0,0,0,0) \\ (1,1,0,0,0,0,0) & (1,0,1,0,0,0,0) & (1,0,0,1,0,0,0) \\ (1,0,0,0,1,0,0) & (1,0,0,0,0,1,0) & (1,0,0,0,0,0,1) \\ (1,2,0,0,0,0,0) & (1,0,2,0,0,0,0) & (1,0,0,2,0,0,0) \\ (1,0,0,0,2,0,0) & (1,0,0,0,0,2,0) & (1,0,0,0,0,0,2) \\ (2,1,0,0,0,0,0) & (2,0,1,0,0,0,0) & (2,0,0,1,0,0,0) \\ (2,0,0,0,1,0,0) & (2,0,0,0,0,1,0) & (2,0,0,0,0,0,1) \\ (1,1,1,0,0,0,0) & (1,1,0,1,0,0,0) & (1,1,0,0,1,0,0) \\ (1,1,0,0,0,1,0) & (1,1,0,0,0,0,1) & (1,0,1,1,0,0,0) \\ (1,0,1,0,1,0,0) & (1,0,1,0,0,1,0) & (1,0,1,0,0,0,1) \\ (1,0,0,1,1,0,0) & (1,0,0,1,0,1,0) & (1,0,0,1,0,0,1) \\ (1,0,0,0,1,1,0) & (1,0,0,0,1,0,1) & (1,0,0,0,0,1,1) \\ \end{array} \end{displaymath} \caption{Sequences of answers for the end-game with $p=3$} \label{fig:abbu:36} \end{center} \end{figure} To be more formally, consider two games $\mathit{ABB}(p,c_1)$ and $\mathit{ABB}(p,c_0)$, where $c_1 \ge c_0$. Let the number of questions in the reduction phase be $x_1=c_1-y$ and $x_0=c_0-y$, respectively, where $y \in \mathbb{N}$ with $y \le c_0$. We want to use the strategy of the $\mathit{ABB}(p,c_0)$ end-game in the $\mathit{ABB}(p,c_1)$ end-game, which for $c_1=c_0$ are obviously the same strategies. The idea relies on color mapping, which must take into account all colors not excluded in the reduction phase, and only these colors. In particular, we should consider $p$ questions with a pairwise disjoint set of colors and each answered with one black peg. Hence, we must additionally assume that $c_0 \ge p^2$ and $x_0 \ge p^2-p+1$. Examples are shown in Figure \ref{fig:abbu:mapping}. The left column contains the questions and answers after the reduction phase of $\mathit{ABB}(p,c_1)$. The right column contains the questions and answers after the reduction phase of $\mathit{ABB}(p,c_0)$. The examples cover three important situations. In the top example, all answers are zero black pegs. The colors $5$ and $6$ are allowed at position $0$, and the colors~$0$ and $6$ at position $1$. In the middle example, at least one answer received a non-zero number of black pegs, but the sum of received black pegs is less than the number of pegs. The colors $0$, $5$ and $6$ are allowed at position $0$, and the colors $0$, $1$ and $6$ at position $1$. In the bottom example, the sum of received black pegs is equal to the number of pegs. The colors $0$ and $3$ are allowed at position $0$, and the colors $1$ and~$4$ at position~$1$. Finally, if there exists a $q$ such that we find a winning strategy for every $\mathit{ABB}(p,c_0)$ end-game in at most $q-x_0$ questions, then the end-strategy is applicable to the $\mathit{ABB}(p,c_1)$ end-game as well. Therefore, $\mathit{abb}(p,c_1) \le q-x_0+x_1 = q+c_1-c_0$. Now, to prove the upper bound for a given $p$, we choose appropriate values of $c$, $q$ and $x$, where \begin{equation} \label{eq:abbu:assumption} c \ge p^2 \quad\textnormal{and}\quad x \ge p^2-p+1. \end{equation} We check by the computer program whether the $\mathit{ABB}(p,c)$ end-game can be finished in $q-x$ questions. Let $(b_1,b_2,\dots,b_{x})$ be a sequence of answers in the reduction phase. As argued above, we have to consider only sequences of answers, where either $b_1=b_2=\dots=b_{x}=0$ or $b_1\ne0$. \subsubsection{Two Pegs} For $p=2$ we choose $c=q=5$ and $x=3$. There are four sequences of answers: $(0,0,0)$, $(1,0,0)$, $(1,1,0)$, $(1,0,1)$. The computer experiment shows that all four end-games can be finished in $q-x=2$ questions, which yields the desired $c$-question upper bound (i.e., $\mathit{abb}(2,c) \le c$) for $c \ge 5$. The computer program finds a $c$-question strategy for $c=2,3,4$, which can also be easily checked by hand. Hence, we have shown the inequality ``$\le$'' in equation (\ref{eq:abb2}). \subsubsection{Three Pegs} For $p=3$ we choose $c=9$, $q=10$ and $x=7$. The $36$ possible sequences of answers are shown in Figure \ref{fig:abbu:36}. By further symmetries they can be reduced to only $17$ ones, shown in Figure \ref{fig:abbu:17}. The computer experiment shows that all end-games are finished in $q-x=3$ questions, which yields the $(c+1)$-question upper bound for $c \ge 9$. The same upper bound for $3 \le c \le 8$ can be quite easy checked by the computer program. Hence, we have shown the inequality ``$\le$'' in equation (\ref{eq:abb3}). \begin{figure}[t] \begin{center} \begin{displaymath} \begin{array}{ccc} (0,0,0,0,0,0,0) & (1,0,0,0,0,0,0) & (2,0,0,0,0,0,0) \\ (1,1,0,0,0,0,0) & (1,0,1,0,0,0,0) & (1,0,0,1,0,0,0) \\ (1,0,0,0,0,1,0) & (1,0,0,0,0,0,1) & (1,1,1,0,0,0,0) \\ (1,1,0,1,0,0,0) & (1,1,0,0,1,0,0) & (1,0,1,0,1,0,0) \\ (1,0,1,0,0,1,0) & (1,0,0,1,0,0,1) & (2,1,0,0,0,0,0) \\ (2,0,1,0,0,0,0) & (2,0,0,1,0,0,0) \\ \end{array} \end{displaymath} \caption{Non-isomorphic sequences of answers for the end-game with $p=3$} \label{fig:abbu:17} \end{center} \end{figure} \subsubsection{Four Pegs} For $p=4$ we choose $c=16$, $q=18$ and $x=13$. There are $560$ sequences of answers, which are reducible to only $117$. However, there are still too many cases to be presented here. The computer experiment shows that all end-games are finished in $q-x=5$ questions, which yields the $(c+2)$-question upper bound for $c \ge 16$. An optimal $(c+1)$-question strategy for $4 \le c \le 7$ can be easily found in a few seconds by the computer program. The cases $8 \le c \le 15$ need some more effort. To reduce computation time we search only for two phase strategies. Note that we omit the assumptions (\ref{eq:abbu:assumption}), because we want only a strategy for a fixed number of colors. For $c=8,9,10$ we apply $q=c+1$ and $x=c-4$. We receive $35$, $56$, $84$ cases, respectively. For $11 \le c \le 15$ we apply $q=c+2$ and $x=c-3$. We receive $165$, $220$, $286$, $364$, $455$ cases, respectively. Some of the cases are isomorphic. However, the time spending on eliminating isomorphisms would be longer than the time needed to solve all cases. Therefore, we omit this step. And again all end-games finish in $q-x=5$ questions, which finally confirms that we have shown inequality~(\ref{eq:abb4upper}). \section{Conclusions and Future Work}\label{conclusions} In this paper we have proved exact values for $\mathit{ab}(2,c)$, $\mathit{ab}(3,c)$, $\mathit{abb}(2,c)$, $\mathit{abb}(3,c)$, and tight bounds for $\mathit{ab}(4,c)$ and $\mathit{abb}(4,c)$. These proofs for $p=2$, $3$, $4$ are all based on the idea of reducing the game with an arbitrary number of colors to a game with a small number of colors and solving it by computer. This idea is general and may be applicable for any constant number of pegs. However, there are two problems, namely generating the growing number of end-games and solving all these end-games. The latter problem seems to be computationally harder and requires new ideas, as the end-games need to be played with approximately $p^2$ colors. This is still too much for $p \ge 4$, as the number of possible secrets (and thus the computational complexity) increases asymptotically like $c^p$. Another interesting case is the game with equal number of pegs and colors, where the AB game and the ABB game equal. For this case we proved only a lower bound. We need new ideas here, as the strategies leading to the values for a fixed number of pegs do not seem to be well applicable for it. Looking at the presented results, one can conjecture that for the $\mathit{AB}(p,c)$ game the number of questions in the worst case grows like the fraction $c/p$, but for the $\mathit{ABB}(p,c)$ game with at least $3$ pegs it seems to be independent of the number of pegs and to be equal to $c+1$. Note that if the formula $\mathit{ABB}(p,c) = c+1$ for $p \ge 3$ could be proved, we would have a complete formula for the Generalized Black-peg AB game. This would be rather interesting, as this game would not become more difficult for increasing $p$. Further work should concentrate on closing the gap between lower and upper bounds for $4$ pegs, on the case of $5$ pegs and on the case of equal number of pegs and colors. \vspace*{-0.5em}
{ "redpajama_set_name": "RedPajamaArXiv" }
850
{"url":"https:\/\/physicscatalyst.com\/Class10\/class10-metals-nonmetals-6.php","text":"# Class 10 Science Metals and Non Metals Practice Worksheet\n\nIn this page we have Class 10 Science Metals and Non Metals Practice Worksheet . Hope you like them and do not forget to like , social shar and comment at the end of the page.\n\n## Multiple Choice Questions:\n\nQuestion 1) The percentage of lead pencil is:\na)Zero\nb)20\nc)80\nd)70\n\nQuestion 2) Which of the following metals occur in their pure state?\na)Copper\nb)Iron\nc)Zinc\nd)Gold\n\nQuestion 3) Silicon is used in\na)Solar energy devices\nb)Semiconductors\nc)Transistors\nd)All of these\n\nQuestion 4) Which of the following is a noble metal?\na)Copper\nb)Iron\nc)Gold\nd)Aluminum\n\nQuestion 5) When a metal is added to dilute HCI solution, there is no evolution of gas. Metal is\na)K\nb)Na\nc)Ag\nd)Zn\n\nQuestion 6) Removal of impurities from ore is known as\na)Crushing and grinding\nb)Concentration of ore\nc)Calcinations\nd)Roasting\n\nQuestion 7) Concentrated sulphuric acid acts as:\na)Oxidizing agent\nb)Dehydrating agent\nc)Both\nd)None of these\n\nQuestion 8) Forth floatation method is used for the concentration of\na)Oxide ores\nb)Sulphide ores\nc)Sulphate ores\nd)Halide ores\n\nQuestion 9) Nature of SO2 is:\na)Basic\nb)Acidic\nc)Amphoteric\nd)Neutral\n\nQuestion 10) Heating of concentrated ore in absence of air for conversion into oxide ore is known as\na)Roasting\nb)Calcinations\nc)Reduction\nd)None of these\n\nQuestion 11) Which of the following metal will not displace hydrogen from steam, dilute acids and alkalies?\na)Iron\nb)Zinc\nc)Mercury\nd)Calcium\n\nQuestion 12) Which reducing agent is used in chemical reduction\na)C\nb)CO\nc)AI\nd)None of these\n\nQuestion 13) What is anode mud\na)Fan of anode\nb)Metal of anode\nc)Impurities collected at anode in electrolysis during purification of metals\nd)All of these\n\nQuestion 14) When a non- metal reacts with chlorine, it forms\na)An ionic chloride\nb)A covalent chloride\nc)A tetrachloride\nd)A dichloride\n\nQuestion 15) Which of the following methods are suitable for preventing an iron frying pan from rusting?\na)Applying grease\nb)Applying paint\nc)Applying a coating of zinc\nd)All of the above\n\nQuestion 16) Out of the following, which cannot be obtained by electrolysis of aqueous solution of the salt?\na)Ag\nb)Mg\nc)Cu\nd)Cr\n\nQuestion 17) Aluminum is used in thermite welding because\na)Aluminum is a light metal\nb)Aluminum has more affinity for oxygen\nc)Aluminum is a strong oxidizing agent\nd)Aluminum is a reactive metal\n\nQuestion 18) Which of the following process is used for the concentration of Bauxite (AI2O3. 2H2O)?\na)Forth floatation\nb)Leaching\nc)Liquation\nd)Magnetic separation\n\nQuestion 19) The best malleable metal is\na)Aluminum\nb)Silver\nc)Gold\n\nQuestion 20) The process of extraction of metal from its ores, is known as\na)Concentration\nb)Calcination\nc)Purification\nd)Metallurgy\n\nQuestion 21) Which is used as catalyst in Haber\u2019s process?\na)Cr\nb)AI\nc)Ni\nd)Fe\n\nQuestion 22) The process to heat the ore in the presence of excess supply of air below its melting point is called\na)Roasting\nb)Calcination\nc)Smelting\nd)Liquation\n\nQuestion 23) Stainless steel is usually made by alloying iron with:\na)Fe and Cu\nb)Cu and Cr\nd)Cr and Ni\n\nQuestion 24) Which of the following metals constitutes the alloys magnalium\na)Al, Cu\nb)Al, Fe\nc)Al, Mg\nd)Al, Mn\n\nQuestion 25) One of the constituents of amalgam is\na)Aluminum\nb)Copper\nc)Iron\nd)Mercury\n\nQuestion 26) German silver is an alloy of:\na)Copper\nb)Magnesium\nd)Iron\n\nQuestion 27) The white phosphorus is stored\na)In air\nb)Under water\nc)Under kerosene\nd)Under CS2\n\nQuestion 28) Bronze is an alloy of copper and:\na)Tin\nb)Aluminum\nc)Zinc\n\nQuestion 29) The chief ore of aluminum is\na)Bauxite\nb)Cryolite\nc)Alunite\nd)Feldspar\n\nQuestion 30) Formula of magnetite is\na)Fe2O3\nb)FeS2\nc)FeCO3\nd)Fe3O4\n\nGiven below are the links of some of the reference books for class 10 Science.\n\nYou can use above books for extra knowledge and practicing different questions.\n\n### Practice Question\n\nQuestion 1 Which among the following is not a base?\nA) NaOH\nB) $NH_4OH$\nC) $C_2H_5OH$\nD) KOH\nQuestion 2 What is the minimum resistance which can be made using five resistors each of 1\/2 Ohm?\nA) 1\/10 Ohm\nB) 1\/25 ohm\nC) 10 ohm\nD) 2 ohm\nQuestion 3 Which of the following statement is incorrect? ?\nA) For every hormone there is a gene\nB) For production of every enzyme there is a gene\nC) For every molecule of fat there is a gene\nD) For every protein there is a gene\n\nNote to our visitors :-\n\nThanks for visiting our website.","date":"2019-07-23 02:30:57","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6196715831756592, \"perplexity\": 7302.7395556527235}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-30\/segments\/1563195528687.63\/warc\/CC-MAIN-20190723022935-20190723044935-00517.warc.gz\"}"}
null
null
OpenDaylight is an open source platform to program and build Software-Defined Networks (SDN). Its aim is to accelerate the adoption of SDN and NFV. With above 90 practical recipes, this book will help you to solve day-to-day problems and maintenance tasks surrounding OpenDaylight's implementation. This book starts with the OpenDaylight fundamentals. In this book, you will gain a sound understanding of the methods and techniques when deploying OpenDaylight in production environment. Later on, you will learn to create a Service Chain using SFC. This book will address common problems and day-to-day maintenance tasks with OpenDaylight. We'll also will teach you how to interact with OpenDaylight APIs and use the necessary tools to simulate networks. You will also explore how to create your own branded OpenDaylight along with authorising and authenticating users using OpenDaylight Identity Manager. By the end of this book, you will have the necessary skills to operate an OpenDaylight SDN environment. Mathieu Lemay is the CEO of Inocybe Technologies, a company founded in 2005, a SDN pioneer specializing in real-world OpenDaylight-based deployment solutions, training, and services, and the CTO of Civimetrix Telecom, a company deploying open access networks. Mathieu has more than 20 years of experience in information technology. At the age of 10, he was programming C++, ADA, and x86 ASM and then got involved in networking from the early bulletin board systems to first commodity internet. He earned a master's degree in electrical engineering with a focus on wireless and optical telecommunications. Inocybe Technologies has been a member of OpenDaylight since June 2013, and Mathieu is currently a committer to the docs and reservation projects. After nine years of being CEO, Mathieu has acquired intensive knowledge of business administration. Alexis de Talhouët has always been interested in the way information is transmitted through a network. His background in computer science and networking combined with an interest in new technology naturally guided him to the SDN field. Jamie Goodyear is an open source advocate, Apache developer, and computer systems analyst with Savoir Technologies. He has designed, critiqued, and supported architectures for large organizations worldwide. Jamie holds a bachelor of science degree in computer science from Memorial University of Newfoundland. Jamie has worked in systems administration, software quality assurance, and senior software developer roles for businesses ranging from small start-ups to international corporations. He has attained committer status on Apache Karaf, Servicemix, and Felix and is a project management committee member on Apache Karaf. His first print publication was co-authoring Packt Publishing's Instant OSGi Starter, followed by co-authoring Packt Publishing's Learning Apache Karaf, and Packt Publishing's Apache Karaf Cookbook. Currently, he divides his time between providing high-level reviews of architectures, mentoring developers and administrators with SOA deployments, and helping grow the OpenDaylight and Apache communities. Rashmi Pujar is interested in new technology trends that are shaping today's networks. With a background in networking and telecommunications, she finds ample opportunities at Inocybe to engage her interests. Mohamed El-Serngawy has experience in virtualization platforms and security, and his curiosity about SDN and cloud computing led him to join Inocybe. He is also interested in software vulnerabilities and playing soccer. Yrineu Rodrigues has three years of experience in software-defined networking, with a solid background in algorithms and programming languages. Yrineu works for Instituto Atlantico on SDN projects and is a project leader/committer on the OpenDaylight project (Network Intent Composition - NIC).
{ "redpajama_set_name": "RedPajamaC4" }
4,622
A university professor has recounted his inspiring story of his struggle from grass to grace. Olayiwola Oyelami said that he was a messenger at the University of Jos before becoming an academic. He said he worked as a messenger for several years until he was challenged by a professor to sit for GCE exam A professor of law at the University of Jos (UNIJOS), Olayiwola Oyelami, has recalled his days of being a messenger at the same institution before finally becoming an academic. Professor Oyelami recounted his struggles in an interview he granted The Nation, in which he said with his primary school leaving certificate, he was only able to get a job as a messenger in UNIJOS. Oyelami said he continued this for several years until one day when one Professor Michael Adekunle confronted him with a challenge. He recalled: "He told me point blank, 'young man, you are too young for this job, why don't you find something else to do.' The Prof told me to go and read, that sitting for GCE exams is not difficult. I asked myself where do I start? I then went back to the same Prof and I asked him to help me get the job of a driver. He told me there was no difference between the messenger I'm doing and driving. "I was just a primary school leaver, I did not even attend the conventional secondary school because my parents could not just afford to take me to secondary school then. I only attended primary school because that level of education was free in the West, but secondary school was not free. If the primary school were not free, I would not have even gone to school at all, even to buy school uniform was not possible for my parents. At my final year in primary school, I was wearing my father's caftan to school, they could not get me the school uniform. So I was one of the beneficiaries of free education of the Western Region then." Oyelami said he was promoted to a clerical assistant instead of messenger grade 3, adding that the university management stated that anyone that didn't improve on his academic qualification would remain a clerical assistant till they retired. According to him, after graduating, getting a job became another issue, adding that one of the librarians advised him to go to Ibadan and get a Masters degree in library studies. He added: "It was to last for one year and I was promised that when I come back he would give me a job. I ran to Ibadan do my second degree in library studies and in a record of one year I graduated and ran back to Jos for the promised job. But the same man that promised me the job said I have to wait a while. Professor Yemi Osinbajo, warned youths in the country never to rely on their academic certificates alone to survive. Osinbajo said this in Ibadan on Thursday, November 9, 2017 while speaking at the 10th convocation ceremony of the Lead City University, where 590 students were awarded first degree certificates.
{ "redpajama_set_name": "RedPajamaC4" }
2,794
package org.apache.xml.security.keys.keyresolver.implementations; import java.io.IOException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import javax.crypto.SecretKey; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.keys.KeyInfo; import org.apache.xml.security.keys.content.KeyInfoReference; import org.apache.xml.security.keys.keyresolver.KeyResolverException; import org.apache.xml.security.keys.keyresolver.KeyResolverSpi; import org.apache.xml.security.keys.storage.StorageResolver; import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.Constants; import org.apache.xml.security.utils.XMLUtils; import org.apache.xml.security.utils.resolver.ResourceResolver; import org.apache.xml.security.utils.resolver.ResourceResolverContext; import org.apache.xml.security.utils.resolver.ResourceResolverException; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.xml.sax.SAXException; /** * KeyResolverSpi implementation which resolves public keys, private keys, secret keys, and X.509 certificates from a * <code>dsig11:KeyInfoReference</code> element. * */ public class KeyInfoReferenceResolver extends KeyResolverSpi { private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(KeyInfoReferenceResolver.class); /** {@inheritDoc} */ @Override protected boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { return XMLUtils.elementIsInSignature11Space(element, Constants._TAG_KEYINFOREFERENCE); } /** {@inheritDoc} */ @Override protected PublicKey engineResolvePublicKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException { try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage, secureValidation); if (referent != null) { return referent.getPublicKey(); } } catch (XMLSecurityException e) { LOG.debug("XMLSecurityException", e); } return null; } /** {@inheritDoc} */ @Override protected X509Certificate engineResolveX509Certificate(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException { try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage, secureValidation); if (referent != null) { return referent.getX509Certificate(); } } catch (XMLSecurityException e) { LOG.debug("XMLSecurityException", e); } return null; } /** {@inheritDoc} */ @Override protected SecretKey engineResolveSecretKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException { try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage, secureValidation); if (referent != null) { return referent.getSecretKey(); } } catch (XMLSecurityException e) { LOG.debug("XMLSecurityException", e); } return null; } /** {@inheritDoc} */ @Override public PrivateKey engineResolvePrivateKey(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws KeyResolverException { try { KeyInfo referent = resolveReferentKeyInfo(element, baseURI, storage, secureValidation); if (referent != null) { return referent.getPrivateKey(); } } catch (XMLSecurityException e) { LOG.debug("XMLSecurityException", e); } return null; } /** * Resolve the KeyInfoReference Element's URI attribute into a KeyInfo instance. * * @param element * @param baseURI * @param storage * @param secureValidation * @return the KeyInfo which is referred to by this KeyInfoReference, or null if can not be resolved * @throws XMLSecurityException */ private KeyInfo resolveReferentKeyInfo(Element element, String baseURI, StorageResolver storage, boolean secureValidation) throws XMLSecurityException { KeyInfoReference reference = new KeyInfoReference(element, baseURI); Attr uriAttr = reference.getURIAttr(); XMLSignatureInput resource = resolveInput(uriAttr, baseURI, secureValidation); Element referentElement = null; try { referentElement = obtainReferenceElement(resource, secureValidation); } catch (Exception e) { LOG.debug("XMLSecurityException", e); return null; } if (referentElement == null) { LOG.debug("De-reference of KeyInfoReference URI returned null: {}", uriAttr.getValue()); return null; } validateReference(referentElement, secureValidation); KeyInfo referent = new KeyInfo(referentElement, baseURI); referent.setSecureValidation(secureValidation); referent.addStorageResolver(storage); return referent; } /** * Validate the Element referred to by the KeyInfoReference. * * @param referentElement * @param secureValidation * * @throws XMLSecurityException */ private void validateReference(Element referentElement, boolean secureValidation) throws XMLSecurityException { if (!XMLUtils.elementIsInSignatureSpace(referentElement, Constants._TAG_KEYINFO)) { Object[] exArgs = { new QName(referentElement.getNamespaceURI(), referentElement.getLocalName()) }; throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.WrongType", exArgs); } KeyInfo referent = new KeyInfo(referentElement, ""); if (referent.containsKeyInfoReference() || referent.containsRetrievalMethod()) { if (secureValidation) { throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithSecure"); } else { // Don't support chains of references at this time. If do support in the future, this is where the code // would go to validate that don't have a cycle, resulting in an infinite loop. This may be unrealistic // to implement, and/or very expensive given remote URI references. throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithoutSecure"); } } } /** * Resolve the XML signature input represented by the specified URI. * * @param uri * @param baseURI * @param secureValidation * @return the XML signature input represented by the specified URI. * @throws XMLSecurityException */ private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation) throws XMLSecurityException { ResourceResolverContext resContext = new ResourceResolverContext(uri, baseURI, secureValidation); if (resContext.isURISafeToResolve()) { return ResourceResolver.resolve(resContext); } String uriToResolve = uri != null ? uri.getValue() : null; Object[] exArgs = { uriToResolve != null ? uriToResolve : "null", baseURI }; throw new ResourceResolverException("utils.resolver.noClass", exArgs, uriToResolve, baseURI); } /** * Resolve the Element effectively represented by the XML signature input source. * * @param resource * @param secureValidation * @return the Element effectively represented by the XML signature input source. * @throws CanonicalizationException * @throws ParserConfigurationException * @throws IOException * @throws SAXException * @throws KeyResolverException */ private Element obtainReferenceElement(XMLSignatureInput resource, boolean secureValidation) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException, KeyResolverException { Element e; if (resource.isElement()) { e = (Element) resource.getSubNode(); } else if (resource.isNodeSet()) { LOG.debug("De-reference of KeyInfoReference returned an unsupported NodeSet"); return null; } else { // Retrieved resource is a byte stream byte[] inputBytes = resource.getBytes(); e = getDocFromBytes(inputBytes, secureValidation); } return e; } }
{ "redpajama_set_name": "RedPajamaGithub" }
4,845
Q: Reactjs router - this.props.history.push is not rendering URL queries from same path I have a component that uses history.push to navigate URLs. The problem is that one of the URL paths relies on search parameters in the URL to render parts of the component. It works fine when the user initially navigates to the url, but when they update it while inside that path it doesn't work. Heres's an example: App.js <Router> <Route path="/jobs" component={Jobs} /> </Router> The url for jobs will contain a job ID, which is used to retrieve the data from the backend - ex: /jobs?id=6583ghawo90. With that id I make a get request inside componentDidMount() of the Jobs component to populate the page. Inside the Jobs component a user can navigate to a new job, which updates the url through this.props.history.push(`/jobs?id=${newjob.id}`). The problem is, when the user navigates to the updated URL, the component doesn't call componentDidMount() therefore doesn't request the new data. I can fix this by manually calling this.componentDidMount(), but this doesn't work if the user hits the back button in their browser. Is there anything I can do to fix this issue? A: You shouldn't be using componentDidMount but componentDidUpdate: componentDidUpdate(prevProps) { // compare previous jobId and current jobId // refetch data if needed } I would suggest you use hooks if you are in the beginning of the development process.
{ "redpajama_set_name": "RedPajamaStackExchange" }
9,381
\section{Introduction} Medical data are not always easily shared for research by those who hold them (companies, hospitals, research centers, universities, consortia). This hampers their integrated use in estimation, inference and prediction. It reduces our ability to identify prognostic factors reliably and to predict the clinical outcomes for future patients, due to possible mis-identification of prognostic factors and overfitting of the statistical model. This is especially a problem for rare diseases, for which only small data sets will typically be available for research. Not surprisingly, therefore, the prognosis of patients with rare diseases and in particular rare cancers is worse than that of patients with more common ones. It follows that we must either create more effective mechanisms and incentives for data sharing between institutions, or focus on technology for the integration of individual analysis outcomes obtained on localized data sets. If we go for the second route, the scientific problem is how to extract from the results of analyses on data subsets the result that would have been found had the subsets been combined into a single data set. Federated learning (FL) is an on-line (i.e.\ non-batch) machine learning approach, developed several years ago in the context of interacting mobile devices (McMahan et al., 2017\nocite{McMahan}), in which local centers use local data for training machine learning systems on site by optimizing a pre-specified loss function, and only the estimated parameters of the trained systems are sent out for integration at a central server. The data, in contrast, stay at their owners' institutions. This procedure is `cycled' around the centers iteratively; all centers update their estimates in an on-line fashion until a convergence criterion is met (see Figure \ref{fig:FL}, left plot). Typically, deep learning neural networks are employed, where the circulated parameters are strengths of interactions between nodes and activation thresholds of nodes. While FL performs excellently in image analysis (see e.g.\ Rieke et al., 2020; Sheller et al., 2020; Gafni et al., 2021\nocite{Rieke, Sheller, Gafni}), it has limitations in application to rare disease data. First, in its standard form FL still requires relatively large data sets (given the large numbers of deep learning parameters). Second, FL does not generate rigorous error bars, since only the most probable parameters are iterated (as opposed to posterior distributions). Third, it is not clear that this process will always converge to a satisfactory final state, since the latent heterogeneity across centers may generate prohibitively conflicting gradients for the model parameters in the maximization procedure, leading to an end result that works for none of the local data sets. In recent years much progress has been made in FL (e.g.\ improved optimization in each center, aggregation of the local models at the central server and dealing with heterogeneity of the local populations (Li et al., 2020; Chen and Chao, 2020; Zhu et al., 2021\nocite{Li2020b, Chen, Zhu}). An overview of the recent developments including references is given in Liu et al.\ (2021)\nocite{Liu}. Multiple researchers have proposed FL in a Bayesian setting for deep learning models (e.g.\ Maddox et al., 2019; Al-Shedivat et al., 2020\nocite{Maddox, Al-Shedivat}): In each local center the posterior distribution is estimated and communicated to the central server, where aggregation takes place. However, this Bayesian procedure turns out to be challenging, especially for deep learning models in which the parameter dimensionality is high. Proposals to address this include approximating the estimated local and global posterior distribution with MCMC (Zhang et al., 2019; Izmailov et al., 2021)\nocite{Zhang2019, Izmailov}, variational inference (Zhang et al., 2018)\nocite{Zhang2018}), or the use of multivariate Gaussian distributions with a Laplace approximation (Maddox et al.\ 2019; Al-Shedivat et al.\ 2020\nocite{Maddox,Al-Shedivat}). For a linear model (as an example) Al-Shedivat et al.\ (2020) \nocite{Al-Shedivat} approximated the local posterior by a multivariate Gaussian. Under the assumption of a flat prior for the model parameters in the local centers, the global posterior distribution in the central server is multivariate Gaussian as well, and estimates of its parameters can be computed from the local sample means and covariance matrices. Although this seems to be an interesting idea on paper, the authors directly note that this way of estimating the global posterior distribution is not feasible in a general setting where models are neural networks with millions of parameters, as it requires estimating and computing the inverse of an $d\times d$ matrix, where $d$ is the number of parameters. In the field of statistical modelling (e.g.\ via generalized linear models) the challenges in FL are not about the computational burden due to the high dimensionality of the model parameters, but rather about the complexities of (medical) data, such as heterogeneity of populations, random or structural missingness of covariates, presence of confounding factors, overfitting, and the interpretation of the parameters in the estimated models. In this paper a Bayesian Federated Inference (BFI) framework is proposed and developed for arbitrary generalized linear regression models, in which the challenges described above are addressed. More specifically, the posterior distributions in the local centers and for the fictive combined data are approximated by multivariate Gaussian distributions around the maximum a posteriori (MAP) estimate. By choosing either a multivariate Gaussian or uninformative distribution for the prior distribution, the outcome of the inference on the combined set can be expressed directly in terms of the outcomes of the separate inferences on the local data sets. With the proposed methodology, there is no need to do inference on the full data set, as its inference results can be computed {\em a posteriori} from the inference results in the subsets in only one round, in contrast to traditional FL where very many iterative inference cycles across the centers are needed (see plot on the right in Figure \ref{fig:FL}). The proposed BFI framework is also accurate for small data sets by choosing the prior distribution wisely. This paper is organized as follows. In Section \ref{sec:BFL} the framework for the BFI strategy is explained in a general setting. Next, in Section \ref{Sec:GLM} we focus on BFI for generalized linear models. Here we also address population heterogeneity and missing covariates. Simulation studies based on real life data have been performed to quantify the efficiency in statistical inference if the data are only locally available for analysis, and the impact of complexities related to heterogeneity and small sample sizes in the local centers (Section \ref{sec:simstudies}). The paper ends with a discussion in Section \ref{sec:Discussion}. \begin{figure} \centering \centering \includegraphics[scale=0.23]{Left_last.png} ~~~~ \centering \includegraphics[scale=0.23]{Right_last.png} \vspace{-2mm} \caption{\small Left: Visualization of an iterative FL procedure. Right: Visualization of the BFI procedure proposed in this paper. One cycle is sufficient for this aggregation. } \label{fig:FL} \end{figure} \section{Bayesian Federated Inference (BFI)} \label{sec:BFL} \subsection{Problem definition and setting} Suppose that the stochastic variable $Y$ is distributed with parametric density $y\to p(y|\mbox{\protect\boldmath $\theta$})$ that is known up to the parameter $\mbox{\protect\boldmath $\theta$}$, which itself has a density $\mbox{\protect\boldmath $\theta$}\to p(\mbox{\protect\boldmath $\theta$})$. Data for statistical inference is available from $L$ non-overlapping data sets from different centers (e.g.\ hospitals). These data sets, $D_1,\ldots, D_L$, and their union are defined as: \begin{eqnarray} D_\ell=\{y_{\ell 1},\ldots,y_{\ell n_\ell}\},~~~~~~~~n_\ell=|D_\ell|,~~~~~~~~D=\bigcup_{\ell=1}^L D_\ell, \nonumber \end{eqnarray} where $y_{\ell i}$ is the $i^{th}$ observation in the $\ell^{th}$ data subset $D_\ell$. The observations within the local data sets, and also across the $L$ data sets, are assumed to be independent. We imagine the scenario where the data from the $L$ subsets are prohibited from being combined into one data set $D$; inference can only be performed for the $L$ subsets separately, and only the latter inference results can be combined. In the next subsection we aim to express the outcome of inference on the combined set $D$ in terms of the outcomes of the $L$ separate inferences on the constituent sets $D_\ell$. \subsection{Formulae for Bayesian subset inference} \label{sub:formulae} In a Bayesian analysis based on any data set $D=\{y_1,\ldots,y_n\}$ from a density $y\to p(y|\mbox{\protect\boldmath $\theta$})$ with prior $\mbox{\protect\boldmath $\theta$}\to p(\mbox{\protect\boldmath $\theta$})$, the posterior density equals \footnote{We use the letter $p$ for any density. From the arguments it follows which density is meant.}: \begin{eqnarray} p(\mbox{\protect\boldmath $\theta$} |D)\;=\;\frac{p(D|\mbox{\protect\boldmath $\theta$})p(\mbox{\protect\boldmath $\theta$})}{Z(D)},~~~~~Z(D)\;=\;\int\!p(D|\mbox{\protect\boldmath $\theta$})p(\mbox{\protect\boldmath $\theta$})\mathrm{d}\mbox{\protect\boldmath $\theta$},~~~~~p(D|\mbox{\protect\boldmath $\theta$})=\prod_{i=1}^{n}p(y_i|\mbox{\protect\boldmath $\theta$}). \label{Eq:post} \end{eqnarray} The maximum a posteriori (MAP) estimator for $\mbox{\protect\boldmath $\theta$}$ is obtained by maximizing $\mbox{\protect\boldmath $\theta$}\to p(\mbox{\protect\boldmath $\theta$}|D)$. Since the complete data set $D$ is the union of $L$ data sets from different centers, we can write the posterior density as \begin{eqnarray} p(\mbox{\protect\boldmath $\theta$}|D)\;=\; \frac{p(\mbox{\protect\boldmath $\theta$})}{Z(D)}\prod_{\ell=1}^L \prod_{i=1}^{n_\ell}p(y_{\ell i}|\mbox{\protect\boldmath $\theta$}). \label{Ex:post2} \end{eqnarray} The expressions in (\ref{Eq:post}) hold for any data set, so they apply also to the sets $D_\ell, \ell=1,\ldots,L$. By rewriting the expression in (\ref{Ex:post2}) with $D$ replaced by $D_\ell$, and with the subset priors denoted by $p_\ell(\mbox{\protect\boldmath $\theta$})$, we find that \begin{eqnarray} \prod_{i=1}^{n_\ell}p(y_{\ell i}|\mbox{\protect\boldmath $\theta$}) &\!=\!& \frac{Z_\ell(D_\ell)}{p_\ell(\mbox{\protect\boldmath $\theta$})} \; p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell), ~~~~~~~~ Z_\ell(D_\ell)\;=\;\int\!p(D_\ell|\mbox{\protect\boldmath $\theta$})p_\ell(\mbox{\protect\boldmath $\theta$})\mathrm{d}\mbox{\protect\boldmath $\theta$}. \nonumber \end{eqnarray} By substituting this into (\ref{Ex:post2}), we obtain: \begin{eqnarray} p(\mbox{\protect\boldmath $\theta$}|D)&\!=\!& \frac{1}{C}\;\bigg( \frac{p(\mbox{\protect\boldmath $\theta$})}{\prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$})}\bigg) \prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell),~~~~\mbox{ with }~~~~ C=\frac{Z(D)}{\prod_{\ell=1}^L Z_\ell(D_\ell)}. \label{eq:link} \end{eqnarray} The constant $C$ can always be recovered via normalization. Hence we can in a relatively simple way express the posterior parameter density $p(\mbox{\protect\boldmath $\theta$}|D)$ in terms of the $L$ local densities $p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell)$. The next question is under which conditions we can obtain accurate (possibly approximate) expressions for the MAP estimator $\hat\mbox{\protect\boldmath $\theta$}$ of $\mbox{\protect\boldmath $\theta$}$ (and its accuracy), which is based on data set $D$, from the $L$ MAP estimators $\hat\mbox{\protect\boldmath $\theta$}_\ell, \ell=1,\ldots,L$ (and their accuracy), which are solely inferred from the data subsets $D_\ell$. This is the topic for the next subsection. \subsection{Bayesian Federated Inference} If the distribution of the data comes from an exponential family, BFI is straightforward; the MAP estimator based on the data $D$ can be obtained directly from summary statistics in the $L$ subsets. Once models become more complex approximating the posterior density $p(\mbox{\protect\boldmath $\theta$}|D)$ by a multivariate Gaussian density may be needed. The Bernstein-von Mises theorem states that under certain regularity conditions and for sufficiently large sample size $n$, the posterior distribution can be approximated well by a multivariate Gaussian distribution centered at the maximum likelihood estimator of $\mbox{\protect\boldmath $\theta$}$ (see e.g.\ van der Vaart, 1998\nocite{Vaart}). In practice, the sample sizes in the centers are finite and may even be small compared to the number of covariates (especially in the case of rare diseases). We, therefore, center around the MAP estimator. We approximate the logarithm of the posterior density (given the combined data set $D$) \begin{eqnarray} \log p(\mbox{\protect\boldmath $\theta$}|D) \;=\; \log p(\mbox{\protect\boldmath $\theta$}) + \sum_{\ell=1}^L \sum_{i=1}^{n_\ell}\log p(y_{\ell i}|\mbox{\protect\boldmath $\theta$}) -\log Z(D) \nonumber \end{eqnarray} by a Taylor expansion up to a quadratic order in $\mbox{\protect\boldmath $\theta$}$ around its MAP parameter estimator $\hat\mbox{\protect\boldmath $\theta$}$ which is based on the combined data set $D$: \begin{eqnarray} \log p(\mbox{\protect\boldmath $\theta$}|D) \;=\; \log p(\hat\mbox{\protect\boldmath $\theta$}|D) -\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^t \hat\mbox{\protect\boldmath $A$}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}) + O_p((\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^3), \label{Taylor} \end{eqnarray} where $\hat \mbox{\protect\boldmath $A$}$ is equal to minus the curvature matrix of $\log p(\mbox{\protect\boldmath $\theta$}|D)$, i.e.\ the matrix of minus second order derivatives with respect to $\mbox{\protect\boldmath $\theta$}$, evaluated at $\hat\mbox{\protect\boldmath $\theta$}$. Note that there is no linear term in the Taylor expansion (\ref{Taylor}), because the gradient of $\log p(\mbox{\protect\boldmath $\theta$}|D)$ at $\hat\mbox{\protect\boldmath $\theta$}$ equals zero by definition (as $\hat\mbox{\protect\boldmath $\theta$}$ is the MAP estimator). Hence, under certain regularity assumptions, for $\mbox{\protect\boldmath $\theta$}$ in a neighbourhood of $\hat\mbox{\protect\boldmath $\theta$}$, \begin{eqnarray} p(\mbox{\protect\boldmath $\theta$}|D) \;\propto \; \exp(-\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^t \hat\mbox{\protect\boldmath $A$}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})) + O_p((\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^3), \nonumber \end{eqnarray} and thus near $\hat{\mbox{\protect\boldmath $\theta$}}$ one can approximate the posterior distribution by a Gaussian density: \begin{eqnarray} p(\mbox{\protect\boldmath $\theta$}|\mbox{\protect\boldmath $D$}) \;\approx\; \Big(\frac{{\rm det}\; \hat\mbox{\protect\boldmath $A$}}{(2\pi)^d}\Big)^{\frac{1}{2}} \exp\big(-\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^t\hat\mbox{\protect\boldmath $A$}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})\big), \label{exp:Gaussian} \end{eqnarray} where $d={\rm dim}(\mbox{\protect\boldmath $\theta$})$ and ${\rm det} \hat \mbox{\protect\boldmath $A$}$ denotes the determinant of the matrix $\hat \mbox{\protect\boldmath $A$}$. In a similar way, each of the $L$ posterior distributions for the subsets $\ell=1\ldots L$ is approximately Gaussian around $\hat\mbox{\protect\boldmath $\theta$}_\ell$ (the MAP estimator based on data set $D_\ell$) and with covariance matrix equal to the inverse of $\hat \mbox{\protect\boldmath $A$}_\ell$. By substituting expression (\ref{exp:Gaussian}) for $p(\mbox{\protect\boldmath $\theta$}|D)$, and the equivalent expressions for $p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell),\ell=1,\ldots,L$, into relation (\ref{eq:link}), we obtain: \begin{eqnarray} \lefteqn{\Big(\frac{{\rm det} \;\hat\mbox{\protect\boldmath $A$}}{(2\pi)^d}\Big)^{\frac{1}{2}} \exp(-\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^t \hat\mbox{\protect\boldmath $A$} (\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}))} \\[4pt] &=& \frac{\prod_{\ell=1}^L Z_\ell(D_\ell)}{Z(D)}~ \frac{p(\mbox{\protect\boldmath $\theta$})}{\prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$})} \prod_{\ell=1}^L \Big(\frac{{\rm det}\; \hat\mbox{\protect\boldmath $A$}_\ell}{(2\pi)^d}\Big)^{\frac{1}{2}}\exp\big(-\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}_\ell)^t \hat\mbox{\protect\boldmath $A$}_\ell(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}_\ell)\big).\nonumber \label{eq:setequal} \end{eqnarray} \bigskip \noindent If the prior densities $\mbox{\protect\boldmath $\theta$}\to p(\mbox{\protect\boldmath $\theta$})$ and $\mbox{\protect\boldmath $\theta$}\to p_\ell(\mbox{\protect\boldmath $\theta$})$ are chosen to be Gaussian, with mean zero and covariance matrices $\mbox{\protect\boldmath $\Lambda$}^{-1}$ and $\mbox{\protect\boldmath $\Lambda$}_\ell^{-1}$, i.e.\ $p(\mbox{\protect\boldmath $\theta$}) = (\det \mbox{\protect\boldmath $\Lambda$}/(2\pi)^d)^{\frac{1}{2}}\exp(-\frac{1}{2}\mbox{\protect\boldmath $\theta$}^t \mbox{\protect\boldmath $\Lambda$} \mbox{\protect\boldmath $\theta$})$ and $p_\ell(\mbox{\protect\boldmath $\theta$}) = (\det \mbox{\protect\boldmath $\Lambda$}_\ell/(2\pi)^d)^{\frac{1}{2}} \exp(-\frac{1}{2}\mbox{\protect\boldmath $\theta$}^t \mbox{\protect\boldmath $\Lambda$}_\ell \mbox{\protect\boldmath $\theta$})$, the above equation becomes \vspace{10pt} \begin{eqnarray} \lefteqn{\hspace{-15mm}\Big(\frac{{\rm det} \;\hat\mbox{\protect\boldmath $A$}}{(2\pi)^d}\Big)^{\frac{1}{2}} \exp(-\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^t \hat\mbox{\protect\boldmath $A$} (\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})) \;= \; \; \frac{\prod_{\ell=1}^L Z_\ell(D_\ell)}{(2\pi)^{\frac{1}{2}d}Z(D)} \Bigg( \frac{(\det \mbox{\protect\boldmath $\Lambda$})\prod_{\ell=1}^L ({\rm det}\; \hat\mbox{\protect\boldmath $A$}_\ell)}{\prod_{\ell=1}^L (\det \mbox{\protect\boldmath $\Lambda$}_\ell)}\Bigg)^{\!\frac{1}{2}} \; \;} \nonumber \\[6pt] &&\times \exp\Big(-\tfrac{1}{2}\mbox{\protect\boldmath $\theta$}^t \big(\mbox{\protect\boldmath $\Lambda$}-\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_\ell\big) \mbox{\protect\boldmath $\theta$}\Big) \prod_{\ell=1}^L \exp\big(-\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}_\ell)^t \hat\mbox{\protect\boldmath $A$}_\ell(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}_\ell)\big). \end{eqnarray} Taking the logarithm on both sides yields, when viewed as a function of $\mbox{\protect\boldmath $\theta$}$: \begin{eqnarray} (\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$})^t \hat\mbox{\protect\boldmath $A$} (\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}) &=& \mbox{\protect\boldmath $\theta$}^t \Big(\mbox{\protect\boldmath $\Lambda$}-\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_\ell\Big) \mbox{\protect\boldmath $\theta$} +\sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}_\ell)^t \hat\mbox{\protect\boldmath $A$}_\ell(\mbox{\protect\boldmath $\theta$}-\hat\mbox{\protect\boldmath $\theta$}_\ell)+B, \label{eq:log-equality} \end{eqnarray} with $B$ representing a term that does not depend on $\mbox{\protect\boldmath $\theta$}$. Both sides are quadratic functions of $\mbox{\protect\boldmath $\theta$}$, and must have the same expansion coefficients for the linear and quadratic terms in $\mbox{\protect\boldmath $\theta$}$. This implies that \begin{eqnarray*} {\rm quadratic~terms:}&& \sum_{j,k=1}^d\theta_j\theta_k\Big( \hat A_{jk} -\Lambda_{jk}+ \sum_{\ell=1}^L\Lambda_{\ell,jk}-\sum_{\ell=1}^L \hat A_{\ell,jk} \Big)=0~~~~~\forall\mbox{\protect\boldmath $\theta$} \\ {\rm linear~terms:}&& \sum_{j=1}^d \theta_j\Big(\hat\mbox{\protect\boldmath $A$}\hat\mbox{\protect\boldmath $\theta$}-\sum_{\ell=1}^L \hat\mbox{\protect\boldmath $A$}_\ell\hat\mbox{\protect\boldmath $\theta$}_\ell\Big)_j=0 ~~~~~\forall\mbox{\protect\boldmath $\theta$}. \end{eqnarray*} The solutions of these equations are: \begin{eqnarray} \hat{\mbox{\protect\boldmath $A$}}=\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_\ell+\mbox{\protect\boldmath $\Lambda$}-\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_\ell, ~~~~~~~~~ \hat{\mbox{\protect\boldmath $\theta$}}= \Big(\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_\ell+\mbox{\protect\boldmath $\Lambda$}-\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_\ell\Big)^{-1}\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_\ell\hat{\mbox{\protect\boldmath $\theta$}}_\ell \label{eq:recombination_formulae} \end{eqnarray} Again there is no need to do inference on the combined data set $D$ to find the estimator $(\hat\mbox{\protect\boldmath $\theta$},\hat\mbox{\protect\boldmath $A$})$ from the combined set; we can compute approximations {\em a posteriori} from the inference results on the subsets. Even if one only wishes to do MAP inference, one would still need the matrix $\hat \mbox{\protect\boldmath $A$}$ to compute error bars or regions for the MAP estimator $\hat \mbox{\protect\boldmath $\theta$}$. More specifically, for the $k^{th}$ element of $\mbox{\protect\boldmath $\theta$}$ its approximate $(1-2\alpha) 100\%$ confidence interval equals $\hat\mbox{\protect\boldmath $\theta$}_k \pm \xi_\alpha \; \sqrt{(\hat\mbox{\protect\boldmath $A$}^{-1})_{k,k}},$ for $\xi_\alpha$ the upper $\alpha$-quantile of the standard Gaussian distribution. Hypothesis testing is also straightforward by the asymptotic normality of $\hat\mbox{\protect\boldmath $\theta$}$. The formulae in (\ref{eq:recombination_formulae}) do not say anything about the plausibility of the subsets describing similar subpopulations. However, once we have computed the estimators $(\hat\mbox{\protect\boldmath $\theta$},\hat\mbox{\protect\boldmath $A$})$ we should find that $\hat\mbox{\protect\boldmath $\theta$}$ is compatible with each `local' estimator $\hat\mbox{\protect\boldmath $\theta$}_\ell$, given the error bars coded in the matrices $\hat\mbox{\protect\boldmath $A$}$ and $\hat\mbox{\protect\boldmath $A$}_\ell$. One way to address this is to consider the coordinate wise approximate $(1-2\alpha) 100\%$ confidence intervals for the difference between the true $\mbox{\protect\boldmath $\theta$}$-value in all subsets except subset $\ell$ and the true parameter value in subset $\ell$: \begin{align} (\hat\mbox{\protect\boldmath $\theta$}_{-\ell}-\hat\mbox{\protect\boldmath $\theta$}_{\ell})_k \; \pm \; \xi_\alpha \; \sqrt{(\hat\mbox{\protect\boldmath $A$}^{-1}_{-\ell}+\hat\mbox{\protect\boldmath $A$}_\ell^{-1})_{kk}}, \nonumber \end{align} where subscript $-\ell$ indicates that the estimator excluded data from subset $\ell$. \subsection{Nuisance parameters differ across centers} \label{subsec:nuisance} Suppose that the vector $\mbox{\protect\boldmath $\theta$}$ can be decomposed as $\mbox{\protect\boldmath $\theta$}^t=(\mbox{\protect\boldmath $\theta$}_a^t, \mbox{\protect\boldmath $\theta$}_b^t)$, where $\mbox{\protect\boldmath $\theta$}_a$ denotes the core parameters of interest of dimension $d_1$, and $\mbox{\protect\boldmath $\theta$}_b$ the nuisance parameters of dimension $d_2$, with $d_1+d_2=d$. The parameter vector of interest $\mbox{\protect\boldmath $\theta$}_a$ is assumed to be equal in the $L$ different sub-populations, but $\mbox{\protect\boldmath $\theta$}_b$ may vary across the sub-populations. Let $\mbox{\protect\boldmath $\theta$}_{b,\ell}$ be the vector of nuisance parameters in population $\ell$. Then, the parameter vector in the model for the combined data set is equal to $\mbox{\protect\boldmath $\theta$}^t=(\mbox{\protect\boldmath $\theta$}_a^t;\mbox{\protect\boldmath $\theta$}_{b,1}^t, \ldots, \mbox{\protect\boldmath $\theta$}_{b,L}^t)$, and is of dimension $d^\prime = d_1+Ld_2$. Let $\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}$ be the estimate of $\mbox{\protect\boldmath $\theta$}_{b,\ell}$ based solely on data in the $\ell^{th}$ subset, and $\hat{\mbox{\protect\boldmath $\theta$}}^{\sim}_{b,\ell}$ be the estimate based on the combined data set. We choose simple priors of the form $p(\mbox{\protect\boldmath $\theta$})=p(\mbox{\protect\boldmath $\theta$}_a)\prod_{\ell=1}^L p(\mbox{\protect\boldmath $\theta$}_{b,\ell})$ (for the combined data set), and $p(\mbox{\protect\boldmath $\theta$}_a,\mbox{\protect\boldmath $\theta$}_{b,\ell})=p_\ell(\mbox{\protect\boldmath $\theta$}_a)p_\ell(\mbox{\protect\boldmath $\theta$}_{b,\ell})$ in data subset $\ell$. We then have \begin{eqnarray} \log p(\mbox{\protect\boldmath $\theta$}|D) \!&=&\!\! \log p(\mbox{\protect\boldmath $\theta$}_a) + \sum_{\ell=1}^L\sum_{i=1}^{n_\ell} \log p(y_{\ell i}|\mbox{\protect\boldmath $\theta$}_a,\mbox{\protect\boldmath $\theta$}_{b,\ell}) + \sum_{\ell=1}^L \log p(\mbox{\protect\boldmath $\theta$}_{b,\ell}) -\log Z(D), \nonumber \\ \log p_\ell(\mbox{\protect\boldmath $\theta$}_a,\mbox{\protect\boldmath $\theta$}_{b,\ell}|D_\ell) \!&=&\!\! \log p_\ell(\mbox{\protect\boldmath $\theta$}_a) +\sum_{i=1}^{n_\ell} \log p(y_{\ell i}|\mbox{\protect\boldmath $\theta$}_a,\mbox{\protect\boldmath $\theta$}_{b,\ell}) + \log p_\ell(\mbox{\protect\boldmath $\theta$}_{b,\ell}) -\log Z_\ell(D_\ell), \nonumber \end{eqnarray} and hence, like in (\ref{eq:link}), \begin{eqnarray} \hspace*{-3mm} \log p(\mbox{\protect\boldmath $\theta$}|D) &=& \sum_{\ell=1}^L \log p_\ell(\mbox{\protect\boldmath $\theta$}_a,\mbox{\protect\boldmath $\theta$}_{b,\ell}|D_\ell)+\log\Big(\frac{p(\mbox{\protect\boldmath $\theta$}_a)}{\prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$}_a)}\Big) \nonumber\\ && \quad\qquad + \; \log\Big(\frac{\prod_{\ell=1}^L p(\mbox{\protect\boldmath $\theta$}_{b,\ell})}{\prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$}_{b,\ell})}\Big)-\log\Big(\frac{Z(D)}{\prod_{\ell=1}^L Z_\ell(D_\ell)}\Big). \label{eq:linkyonly} \end{eqnarray} The quadratic approximations of the a posteriori densities are now \begin{eqnarray} &&\log p(\mbox{\protect\boldmath $\theta$}|D) \;\approx\; \log p(\hat\mbox{\protect\boldmath $\theta$}|D) -\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}_a-\hat\mbox{\protect\boldmath $\theta$}_a)^t \hat\mbox{\protect\boldmath $A$}_a(\mbox{\protect\boldmath $\theta$}_a-\hat\mbox{\protect\boldmath $\theta$}_a) \nonumber\\ && \hspace{10mm}-\;\tfrac{1}{2}\sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat\mbox{\protect\boldmath $\theta$}^{\sim}_{b,\ell})^t \hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat\mbox{\protect\boldmath $\theta$}^{\sim}_{b,\ell})-(\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_a)^t\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}^\sim_{ab,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}^\sim_{b,\ell}), \nonumber \\[1mm] &&\log p_\ell(\mbox{\protect\boldmath $\theta$}_a,\mbox{\protect\boldmath $\theta$}_{b,\ell}|D_\ell)\;\approx\; \log p_\ell(\hat{\mbox{\protect\boldmath $\theta$}}_a,\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}|D_\ell) -\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell})^t \hat{\mbox{\protect\boldmath $A$}}_{a,\ell}(\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell}) \nonumber\\ && \hspace{10mm} -\;\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell})^t \hat\mbox{\protect\boldmath $A$}_{b,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}) -(\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell})^t \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}) \nonumber \end{eqnarray} where $\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}^{\sim}$ is the MAP estimator of $\mbox{\protect\boldmath $\theta$}_b$ found via inference on the full set $D$, and $\hat{\mbox{\protect\boldmath $A$}}^{\sim}_{b,\ell}$ and $\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}^\sim$ denote the matrices of minus the second derivatives of $\log p(\mbox{\protect\boldmath $\theta$}|D)$ with respect to the components of $\mbox{\protect\boldmath $\theta$}_{b,\ell}$ and with respect to both $\mbox{\protect\boldmath $\theta$}_{a}$ and $\mbox{\protect\boldmath $\theta$}_{b,\ell}$, respectively. Insertion into (\ref{eq:linkyonly}), assuming the usual Gaussian zero-average priors for $\mbox{\protect\boldmath $\theta$}_a$, and Gaussian zero-average priors for $\mbox{\protect\boldmath $\theta$}_{b,\ell}$ with inverse covariance matrices $\mbox{\protect\boldmath $\Lambda$}_b$ in $p(\mbox{\protect\boldmath $\theta$}_{b,\ell})$ and $\mbox{\protect\boldmath $\Lambda$}_{b,\ell}$ in $p_\ell(\mbox{\protect\boldmath $\theta$}_{b,\ell})$ gives \begin{eqnarray} && (\mbox{\protect\boldmath $\theta$}_a-\hat\mbox{\protect\boldmath $\theta$}_a)^t \hat\mbox{\protect\boldmath $A$}_a(\mbox{\protect\boldmath $\theta$}_a-\hat\mbox{\protect\boldmath $\theta$}_a) + \sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat\mbox{\protect\boldmath $\theta$}^{\sim}_{b,\ell})^t \hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat\mbox{\protect\boldmath $\theta$}^{\sim}_{b,\ell}) \nonumber \\ && \hspace{60mm} + \;2(\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_a)^t\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}^\sim_{ab,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}^\sim_{b,\ell}) \nonumber\\ && = \sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell})^t \hat{\mbox{\protect\boldmath $A$}}_{a,\ell}(\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell}) +\mbox{\protect\boldmath $\theta$}_a^t\Big(\mbox{\protect\boldmath $\Lambda$}_a-\sum_{\ell=1}^L\mbox{\protect\boldmath $\Lambda$}_{a,\ell}\Big)\mbox{\protect\boldmath $\theta$}_a \\ && \hspace{10mm} +\;\sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell})^t \hat\mbox{\protect\boldmath $A$}_{b,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}) \; + \; \sum_{\ell=1}^L \mbox{\protect\boldmath $\theta$}_{b,\ell}^t(\mbox{\protect\boldmath $\Lambda$}_b-\mbox{\protect\boldmath $\Lambda$}_{b,\ell})\mbox{\protect\boldmath $\theta$}_{b,\ell} \nonumber \\ && \hspace{10mm} +\; 2 \sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}_a-\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell})^t \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}(\mbox{\protect\boldmath $\theta$}_{b,\ell}-\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}) +B \nonumber \end{eqnarray} with $B$ representing a term that does not depend on $\mbox{\protect\boldmath $\theta$}$. Both sides in the above equation are quadratic functions of $\mbox{\protect\boldmath $\theta$}$, and this equation must hold for all $\mbox{\protect\boldmath $\theta$}$. We must therefore equate the coefficients on either side of the specific linear and quadratic terms. Identification of the quadratic terms in $\mbox{\protect\boldmath $\theta$}$ leads to the following equations: \begin{eqnarray} \hat{\mbox{\protect\boldmath $A$}}_a=\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_{a,\ell}+\mbox{\protect\boldmath $\Lambda$}_a-\sum_{\ell=1}^L\mbox{\protect\boldmath $\Lambda$}_{a,\ell}, ~~~~~ \hat{\mbox{\protect\boldmath $A$}}_{b,\ell}^\sim=\hat{\mbox{\protect\boldmath $A$}}_{b,\ell}+\mbox{\protect\boldmath $\Lambda$}_b-\mbox{\protect\boldmath $\Lambda$}_{b,\ell}, ~~~~~ \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}^\sim=\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}, \label{eq:with_nuisance_1} \end{eqnarray} whereas identification of the linear terms in $\mbox{\protect\boldmath $\theta$}$ gives the two equations \begin{eqnarray} \hat\mbox{\protect\boldmath $A$}_a\hat\mbox{\protect\boldmath $\theta$}_a +\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}^\sim_{ab,\ell}\hat{\mbox{\protect\boldmath $\theta$}}^\sim_{b,\ell} &=& \sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_{a,\ell}\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell} +\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell}, \nonumber \\ \hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell}\hat\mbox{\protect\boldmath $\theta$}^{\sim}_{b,\ell} +(\hat{\mbox{\protect\boldmath $A$}}^\sim_{ab,\ell})^t\hat{\mbox{\protect\boldmath $\theta$}}_a &=& \hat\mbox{\protect\boldmath $A$}_{b,\ell}\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell} +(\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell})^t\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell}. \nonumber \end{eqnarray} These equations can again be solved, giving formulae for the estimators $\hat{\mbox{\protect\boldmath $\theta$}}_a$ and $\hat{\mbox{\protect\boldmath $\theta$}}_b^\sim$ that would be obtained based on the combined data in terms of estimators in the separate centers. For the core parameters one finds: \begin{eqnarray} &&\hspace*{-5mm} \hat{\mbox{\protect\boldmath $\theta$}}_a =\Big( \hat\mbox{\protect\boldmath $A$}_a -\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}(\hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell})^{-1}(\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell})^t \Big)^{\!-1} \;\times\; \nonumber\\ && \sum_{\ell=1}^L \Big[ \Big( \hat{\mbox{\protect\boldmath $A$}}_{a,\ell} - \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}(\hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell})^{-1}(\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell})^t\Big)\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell} + \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}\Big(1\!\!{\rm I} - (\hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell})^{-1}\hat\mbox{\protect\boldmath $A$}_{b,\ell}\Big)\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell} \Big]~~ \nonumber \end{eqnarray} with $1\!\!{\rm I}$ the $d_2\times d_2$ unit matrix and the expressions for the matrices $\hat{\mbox{\protect\boldmath $A$}}_a$ and $\hat{\mbox{\protect\boldmath $A$}}^{\sim}_{b,\ell}$ as given in (\ref{eq:with_nuisance_1}). If required, the full set estimators for the nuisance parameters can subsequently be calculated from \begin{eqnarray} && \hat\mbox{\protect\boldmath $\theta$}^{\sim}_{b,\ell} = (\hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell})^{-1}\Big[\hat\mbox{\protect\boldmath $A$}_{b,\ell}\hat{\mbox{\protect\boldmath $\theta$}}_{b,\ell} + (\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell})^t(\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell} - \hat{\mbox{\protect\boldmath $\theta$}}_a)\Big]. \nonumber \end{eqnarray} We conclude that also if nuisance parameters are different across centers, there is no need to combine the data subsets; we can compute all relevant full set estimators {\em a posteriori} from the estimators obtained from the subsets. The above equations are seen to simplify if we choose identical nuisance parameter priors throughout, i.e. $\mbox{\protect\boldmath $\Lambda$}_{b,\ell}=\mbox{\protect\boldmath $\Lambda$}_b$ for all $\ell$. In that case $\hat{\mbox{\protect\boldmath $A$}}^\sim_{b,\ell}=\hat{\mbox{\protect\boldmath $A$}}_{b,\ell}$, and hence \begin{eqnarray} &&\hspace*{-5mm} \hat{\mbox{\protect\boldmath $\theta$}}_a =\Big( \hat\mbox{\protect\boldmath $A$}_a -\sum_{\ell=1}^L \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}(\hat{\mbox{\protect\boldmath $A$}}_{b,\ell})^{-1}(\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell})^t \Big)^{\!-1}\!\sum_{\ell=1}^L \Big( \hat{\mbox{\protect\boldmath $A$}}_{a,\ell} - \hat{\mbox{\protect\boldmath $A$}}_{ab,\ell}(\hat{\mbox{\protect\boldmath $A$}}_{b,\ell})^{-1}(\hat{\mbox{\protect\boldmath $A$}}_{ab,\ell})^t\Big)\hat{\mbox{\protect\boldmath $\theta$}}_{a,\ell}. \nonumber \end{eqnarray} In Section \ref{sec:simstudies} an example is given in which the data in three centers follow a logistic regression model in which the center specific intercepts are the nuisance parameters and the remaining regression parameters are the parameters of interest. This results in an aggregated model that contains an intercept for each of the three populations. \section{Bayesian regression and subset inference} \label{Sec:GLM} \subsection{Bayesian regression} The most relevant problem areas in medicine are those where each data sample is a pair $(\mbox{\protect\boldmath $X$},Y)$ of input vectors $\mbox{\protect\boldmath $X$}$ (the covariates) and output values $Y$ (e.g.\ clinical outcome or treatment response). A parametrized model relates $\mbox{\protect\boldmath $X$}$ to $Y$, and the available data are used to infer the parameters for this model. In this section the BFI methodology described in Section \ref{sec:BFL} is applied to parametric regression models, and associated challenges such as heterogeneity across the populations are addressed. Suppose that $Y|\mbox{\protect\boldmath $X$}=\mbox{\protect\boldmath $x$}$ and $\mbox{\protect\boldmath $X$}$ have densities $y \to p(y|\mbox{\protect\boldmath $x$},\mbox{\protect\boldmath $\theta$}_1)$ and $\mbox{\protect\boldmath $x$} \to p(\mbox{\protect\boldmath $x$}|\mbox{\protect\boldmath $\theta$}_2)$, respectively, so that for $\mbox{\protect\boldmath $\theta$}^t=(\mbox{\protect\boldmath $\theta$}_1^t,\mbox{\protect\boldmath $\theta$}_2^t)$ with unknown parameter vectors $\mbox{\protect\boldmath $\theta$}_1\in\mathbb{R}^{ d_1}$ and $\mbox{\protect\boldmath $\theta$}_2\in\mathbb{R}^{ d_1}$ we seek to infer: $(y,\mbox{\protect\boldmath $x$}) \to p(y,\mbox{\protect\boldmath $x$}|\mbox{\protect\boldmath $\theta$}) \;=\; p(y|\mbox{\protect\boldmath $x$},\mbox{\protect\boldmath $\theta$}_1) p(\mbox{\protect\boldmath $x$}|\mbox{\protect\boldmath $\theta$}_2).$ An example is the class of generalized linear models (GLMs). In GLMs the outcome variable $Y$ is related to the covariates $\mbox{\protect\boldmath $x$}$ only via the linear predictor $\mbox{\protect\boldmath $\beta$}^t \mbox{\protect\boldmath $x$}$. By setting the first covariate equal to 1, an intercept can be included trivially in the model. Let $D_\ell$ be the $\ell^{th}$ data subset, and $D$ be the union of the $L$ subsets: \begin{eqnarray} D_\ell=\{(\mbox{\protect\boldmath $x$}_{\ell 1},y_{\ell 1}),\ldots,(\mbox{\protect\boldmath $x$}_{\ell n_\ell},y_{\ell n_\ell})\},~~~~~~~~n_\ell=|D_\ell|,~~~~~~~~D=\bigcup_{\ell=1}^L D_\ell. \nonumber \end{eqnarray} As in the previous section, we aim to express the outcome of inference on the parameters in the combined set $D$ in terms of the outcomes of $L$ separate inferences on the constituent sets $D_\ell, \ell=1,\ldots,L$. For simplicity we assume statistically independent $\mbox{\protect\boldmath $\theta$}_1$ and $\mbox{\protect\boldmath $\theta$}_2$, i.e.\ $p(\mbox{\protect\boldmath $\theta$}_1,\mbox{\protect\boldmath $\theta$}_2)=p(\mbox{\protect\boldmath $\theta$}_1)p(\mbox{\protect\boldmath $\theta$}_2)$ and $p_\ell(\mbox{\protect\boldmath $\theta$}_1,\mbox{\protect\boldmath $\theta$}_2)=p_\ell(\mbox{\protect\boldmath $\theta$}_1)p_\ell(\mbox{\protect\boldmath $\theta$}_2)$ for all $\ell$. For the combined data set $D$ and for the subsets $D_\ell$ the log posteriori distribution is then given by, respectively, \begin{eqnarray} && \hspace*{-8mm} \log p(\mbox{\protect\boldmath $\theta$}|D) \;=\; \log p(\mbox{\protect\boldmath $\theta$}) + \sum_{\ell=1}^L\sum_{i=1}^{n_\ell} \log p(y_{\ell i},\mbox{\protect\boldmath $x$}_{\ell i}|\mbox{\protect\boldmath $\theta$}) -\log Z(D) \\ &=& \hspace*{-2mm} \log p(\mbox{\protect\boldmath $\theta$}_1) + \sum_{\ell=1}^L\sum_{i=1}^{n_\ell} \log p(y_{\ell i}|\mbox{\protect\boldmath $x$}_{\ell i},\mbox{\protect\boldmath $\theta$}_1) + \log p(\mbox{\protect\boldmath $\theta$}_2) + \sum_{\ell=1}^L\sum_{i=1}^{n_\ell} \log p(\mbox{\protect\boldmath $x$}_{\ell i}|\mbox{\protect\boldmath $\theta$}_2) -\log Z(D) \nonumber \label{eq:logp_D} \\ && \hspace*{-8mm} \log p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell) \;=\; \log p_\ell(\mbox{\protect\boldmath $\theta$}) + \sum_{i=1}^{n_\ell} \log p(y_{\ell i},\mbox{\protect\boldmath $x$}_{\ell i}|\mbox{\protect\boldmath $\theta$}) -\log Z_\ell(D_\ell) \\ &=& \hspace*{-2mm} \log p_\ell(\mbox{\protect\boldmath $\theta$}_1) +\sum_{i=1}^{n_\ell} \log p(y_{\ell i}|\mbox{\protect\boldmath $x$}_{\ell i},\mbox{\protect\boldmath $\theta$}_1) + \log p_\ell(\mbox{\protect\boldmath $\theta$}_2) + \sum_{i=1}^{n_\ell} \log p(\mbox{\protect\boldmath $x$}_{\ell i}|\mbox{\protect\boldmath $\theta$}_2) -\log Z_\ell(D_\ell). \nonumber \label{eq:logpD_l} \end{eqnarray} So, the log posterior densities are decomposed into terms that depend on either $\mbox{\protect\boldmath $\theta$}_1$, or on $\mbox{\protect\boldmath $\theta$}_2$ (or neither), and maximization with respect to $\mbox{\protect\boldmath $\theta$}_1$ and $\mbox{\protect\boldmath $\theta$}_2$ to obtain their MAP estimators can be performed independently. Similarly as in (\ref{eq:link}), the link between the log posterior density for the combined data set and for the subsets takes the form \begin{eqnarray} \label{eq:full_into_subsets} \lefteqn{\log p(\mbox{\protect\boldmath $\theta$}|D)}\\ \hspace*{-2mm} &=& \hspace*{-3mm} \sum_{\ell=1}^L \log p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell)+\log\Big(\frac{p(\mbox{\protect\boldmath $\theta$}_1)}{\prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$}_1)}\Big)+\log\Big(\frac{p(\mbox{\protect\boldmath $\theta$}_2)}{\prod_{\ell=1}^L p_\ell(\mbox{\protect\boldmath $\theta$}_2)}\Big)-\log\Big(\frac{Z(D)}{\prod_{\ell=1}^L Z_\ell(D_\ell)}\Big). \nonumber \end{eqnarray} Again the log posterior densities $\log p(\mbox{\protect\boldmath $\theta$}|D)$ and $\log p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell)$ can for sufficiently large $n$ be approximated by quadratic expansions for $\mbox{\protect\boldmath $\theta$}$ near the MAP estimators $\hat\mbox{\protect\boldmath $\theta$}$ and $\hat{\mbox{\protect\boldmath $\theta$}}_\ell$, leading to Gaussian approximations for the posterior densities themselves. Since the log posterior densities can both be decomposed in terms dependent on either $\mbox{\protect\boldmath $\theta$}_1$ or $\mbox{\protect\boldmath $\theta$}_2$ (there are no mixture terms), the matrices $\hat{\mbox{\protect\boldmath $A$}}$ and $\hat{\mbox{\protect\boldmath $A$}}_\ell$ are diagonal block matrices of the form \begin{eqnarray} \hat{\mbox{\protect\boldmath $A$}}=\left(\!\begin{array}{cc} \hat{\mbox{\protect\boldmath $A$}}_1 & {\bf 0}\\ {\bf 0} & \hat{\mbox{\protect\boldmath $A$}}_2\end{array}\! \right),~~~~~~~~\hat{\mbox{\protect\boldmath $A$}}_\ell=\left(\!\begin{array}{cc} \hat{\mbox{\protect\boldmath $A$}}_{1,\ell} & {\bf 0}\\ {\bf 0} & \hat{\mbox{\protect\boldmath $A$}}_{2,\ell}\end{array}\! \right), \nonumber \end{eqnarray} in which the blocks $\{\hat{\mbox{\protect\boldmath $A$}}_1,\hat{\mbox{\protect\boldmath $A$}}_{1,\ell}\}$ and $\{\hat{\mbox{\protect\boldmath $A$}}_2,\hat{\mbox{\protect\boldmath $A$}}_{2,\ell}\}$ represent the minus curvature matrices for $\mbox{\protect\boldmath $\theta$}_1$ and $\mbox{\protect\boldmath $\theta$}_2$, respectively. The quadratic log-likelihood approximation for $p(\mbox{\protect\boldmath $\theta$}|D)$ is \begin{eqnarray} \hspace*{-5mm} \log p(\mbox{\protect\boldmath $\theta$}|D)\!&\!\approx\!&\! \log p(\hat\mbox{\protect\boldmath $\theta$}|D) -\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}_1-\hat\mbox{\protect\boldmath $\theta$}_1)^t \hat\mbox{\protect\boldmath $A$}_1(\mbox{\protect\boldmath $\theta$}_1-\hat\mbox{\protect\boldmath $\theta$}_1) -\tfrac{1}{2}(\mbox{\protect\boldmath $\theta$}_2-\hat\mbox{\protect\boldmath $\theta$}_2)^t \hat\mbox{\protect\boldmath $A$}_2(\mbox{\protect\boldmath $\theta$}_2-\hat\mbox{\protect\boldmath $\theta$}_2), \nonumber \end{eqnarray} and a similar expression holds for $p_\ell(\mbox{\protect\boldmath $\theta$}|D_\ell)$. If all prior parameter densities are chosen to be Gaussian with mean zero and inverse covariance matrices $\mbox{\protect\boldmath $\Lambda$}_1$ and $\mbox{\protect\boldmath $\Lambda$}_{1,\ell}$ (for $\mbox{\protect\boldmath $\theta$}_1$) and $\mbox{\protect\boldmath $\Lambda$}_2$ and $\mbox{\protect\boldmath $\Lambda$}_{2,\ell}$ (for $\mbox{\protect\boldmath $\theta$}_2$), then insertion of these quadratic approximations into (\ref{eq:full_into_subsets}) gives, for $k=1,2$ \begin{eqnarray} (\mbox{\protect\boldmath $\theta$}_k-\hat\mbox{\protect\boldmath $\theta$}_k)^t \hat\mbox{\protect\boldmath $A$}_k(\mbox{\protect\boldmath $\theta$}_k-\hat\mbox{\protect\boldmath $\theta$}_k) = \mbox{\protect\boldmath $\theta$}_k^t \Big(\mbox{\protect\boldmath $\Lambda$}_k -\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_{k,\ell}\Big) \mbox{\protect\boldmath $\theta$}_k+ \sum_{\ell=1}^L (\mbox{\protect\boldmath $\theta$}_k-\hat{\mbox{\protect\boldmath $\theta$}}_{k,\ell})^t \hat{\mbox{\protect\boldmath $A$}}_{k,\ell}(\mbox{\protect\boldmath $\theta$}_k-\hat{\mbox{\protect\boldmath $\theta$}}_{k,\ell}) +B_k, \nonumber \end{eqnarray} with $B_1$ and $B_2$ not dependent on $\mbox{\protect\boldmath $\theta$}$. Expressions for $\hat\mbox{\protect\boldmath $\theta$}_1, \hat\mbox{\protect\boldmath $\theta$}_2, \hat \mbox{\protect\boldmath $A$}_1$ and $\hat \mbox{\protect\boldmath $A$}_2$ in terms of their subset analogons can be now be extracted similarly as in (\ref{eq:recombination_formulae}), giving \begin{eqnarray} \hspace*{-5mm} && \hat\mbox{\protect\boldmath $A$}_1 = \sum_{\ell=1}^L \hat\mbox{\protect\boldmath $A$}_{1,\ell}+\mbox{\protect\boldmath $\Lambda$}_1-\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_{1,\ell},~~~~~~~~~ \hat\mbox{\protect\boldmath $\theta$}_1= \hat\mbox{\protect\boldmath $A$}_1^{-1}\sum_{\ell=1}^L \hat\mbox{\protect\boldmath $A$}_{1,\ell}\hat\mbox{\protect\boldmath $\theta$}_{1,\ell}, \label{eq:recover_theta1} \\ \hspace*{-5mm} && \hat\mbox{\protect\boldmath $A$}_2 = \sum_{\ell=1}^L \hat\mbox{\protect\boldmath $A$}_{2,\ell}+\mbox{\protect\boldmath $\Lambda$}_2-\sum_{\ell=1}^L \mbox{\protect\boldmath $\Lambda$}_{2,\ell},~~~~~~~~~ \hat\mbox{\protect\boldmath $\theta$}_2= \hat\mbox{\protect\boldmath $A$}_2^{-1}\sum_{\ell=1}^L \hat\mbox{\protect\boldmath $A$}_{2,\ell}\hat\mbox{\protect\boldmath $\theta$}_{2,\ell}. \label{eq:recover_theta2} \end{eqnarray} From these formulae it is also clear that the distribution of the covariates does not affect the estimator $(\hat\mbox{\protect\boldmath $\theta$}_1, \hat A_1)$. It is well known that there is a direct link between Bayesian inference for regression models and penalized regression. If one chooses a Gaussian prior with a diagonal inverse covariance matrix $\mbox{\protect\boldmath $\Lambda$}$ with all diagonal elements equal to $\lambda$, the MAP estimator for $\mbox{\protect\boldmath $\theta$}$ is identical to the ridge penalized ML estimator for $\mbox{\protect\boldmath $\theta$}$ with regularizer $\lambda$ (Wu et al.\ 2018\nocite{Wu}). The higher the value of $\lambda$, the stronger the penalization, or the smaller the variance of the prior distribution. When the sample size in one or more local subsets is small compared to the number of covariates in the model, the model in that particular center may be overfitted. Increasing the value of the regularizer $\lambda_\ell$ (i.e.\ of the inverse variance of the prior in subset $\ell$) can prevent overfitting in the local models and increase the inference accuracy. This is illustrated in Section \ref{sec:simstudies}. Note that in most ridge regression analyses only the regression (or association) parameters are penalized, not the intercept. \subsection{Heterogeneity across populations} So far we have assumed that the distributions of the covariates and the conditional distributions of the outcome given the covariates are the same in all centers. In practice this means that we assumed that the subsets were sampled from statistically identical populations. This assumption might be violated, for instance if the different centers represent different nationalities or hospitals. In that case, the $L$ subsets are sampled from structurally different populations, and the distributions of the covariates and/or of the (conditional) outcomes may well differ across centers. If we assume that the regression parameters $\mbox{\protect\boldmath $\theta$}_1$ do not vary across centers but that the parameters of the covariate distributions, $\mbox{\protect\boldmath $\theta$}_2$, may do so, and choose simple priors of the form $p(\mbox{\protect\boldmath $\theta$})=p(\mbox{\protect\boldmath $\theta$}_1)\prod_{\ell=1}^L p(\mbox{\protect\boldmath $\theta$}_{2,\ell})$, then the calculations as before yields equation (\ref{eq:recover_theta1}) derived earlier for all estimators related to $\mbox{\protect\boldmath $\theta$}_1$. Estimation of $\mbox{\protect\boldmath $\theta$}_1$ is hence not affected by having subset-specific parameters $\mbox{\protect\boldmath $\theta$}_2$. Equation (\ref{eq:recover_theta2}), in contrast, is now replaced by \begin{eqnarray} && \hat{\mbox{\protect\boldmath $A$}}^{\sim}_{2,\ell}=\hat{\mbox{\protect\boldmath $A$}}_{2,\ell}+\mbox{\protect\boldmath $\Lambda$}_2-\mbox{\protect\boldmath $\Lambda$}_{2,\ell},~~~~~~~~~ \hat{\mbox{\protect\boldmath $\theta$}}^\sim_{2,\ell}=\big(\hat{\mbox{\protect\boldmath $A$}}_{2,\ell}+\mbox{\protect\boldmath $\Lambda$}_2-\mbox{\protect\boldmath $\Lambda$}_{2,\ell}\big)^{-1} \hat{\mbox{\protect\boldmath $A$}}_{2,\ell}\hat{\mbox{\protect\boldmath $\theta$}}_{2,\ell}, \nonumber \end{eqnarray} where $\hat{\mbox{\protect\boldmath $\theta$}}_{2,\ell}^{\sim}$ is the MAP estimator of $\mbox{\protect\boldmath $\theta$}_2$ found via inference on the full set $D$, and $\hat{\mbox{\protect\boldmath $A$}}^{\sim}_{2,\ell}$ denotes the matrix of minus second derivatives of $\log p(\mbox{\protect\boldmath $\theta$}|D)$ with respect to $\mbox{\protect\boldmath $\theta$}_{2,\ell}$. \subsection{Sets of covariates differ across centers} Not only the covariate distributions, but also the actual set of available covariates may differ across centers. For instance, it might be that in some hospitals the body mass index of patients is measured, whereas in other hospitals it is not. If this covariate is not of interest for the study, it can be excluded from the analysis. Including the covariate in the regression models in some centers and not in others might give non-interpretable results, as covariates may be correlated. In general, if an individual covariate is missing, imputation methods can be applied. Common methods are single and multiple regression imputation (van Buuren, 2018\nocite{Buuren}): a value for a missing covariate is predicted by a regression model that was fitted based on the observed covariates and outcome values. In our present context a similar strategy can be applied. A prediction model for the unobserved covariate is fitted in the centers in which the covariate is measured, combined by means of the BFI strategy in order to obtain one regression model (according to the formulae above) and subsequently used to predict and impute the covariate values in the centers where the covariate was not measured. After imputation, the final BFI model can then be constructed as before. Of course, this strategy only works if the simultaneous distributions of the covariates are identical across centers. \section{Simulation Studies and Application} \label{sec:simstudies} \subsection{Study aims} In this section we describe several simulation studies aimed at quantifying the performance of the BFI methodology. More specifically, the agreement between the inference results of the BFI strategy and of those obtained when actually combining all the data of $L$ subsets are studied. Regression models are employed for multiple purposes, e.g.\ for predicting outcomes of new patients or subjects, or for studying association between a factor and the outcome. Therefore, we focus on quantifying the agreement of parameter estimates and on outcome predictions in the settings where there is homogeneity or heterogeneity across local centers, low sample sizes and unmeasured covariates. We use existing real life data for our simulation studies. \subsection{Real life data} Our data set consists of data of trauma patients from different hospitals. The outcome variable of interest is mortality (binary) and the covariates are age, sex, the Injury Severity Score (ISS, ranging from 1 (low) to 75 (high)), the Glasgow Coma Scale (GCS, which expresses the level of consciousness, ranging from 3 (low) to 15 (high)). The data originate from multiple hospitals which can be categorised in three groups as: peripheral hospital without a neuro-surgical unit, peripheral hospital with a neuro-surgical unit, and academic medical center. They were collected between October 1984 and October 1985, in 12 hospitals from one of the three categories above. The original aim in collecting these data was to compare hospitals from the three categories, in terms of differences in rates of management error (Draaisma et al., 1989\nocite{Draaisma}). In the data in their present form (that have since been made available for educational purposes) there is no longer any reference to individual hospitals; there is only a variable indicating in which of the three hospital categories the data were recorded. In the absence of more detailed information we assume, for simplicity and in the terminology of the present study, that there are only three data subsets or centers, which correspond to three categories. Because the data in each subset come from a distinct hospital type, the patient populations and characteristics of the patient traumas may be different, i.e.\ the distributions of the covariates may vary across subsets. Nevertheless, the regression parameters of the corresponding covariates may be the same for the three subsets. Some data characteristics are given in Table \ref{Tab:data}. \begin{table}[h] \footnotesize \begin{center} \begin{tabular}{|l|c|c|c|c|c|c|} \hline Data subsets & number & mortality & age & sex & ISS & GCS \\ & $n_\ell$ & \% & median & \% females & median & median \\ \hline peripheral no NSU & 49 & 43 & 42 & 22 & 41 & 11 \\ peripheral with NSU & 106 & 40 & 34 & 24 & 33 & 14 \\ academic hospitals & 216 & 22 & 35 & 30 & 29 & 11 \\ \hline combined data & 371 & 30 & 36 & 27 & 30 & 12 \\ \hline \end{tabular} \end{center} \vspace{-7mm} \caption{\small Data characteristics in the three subsets (here indicating different hospital types) and in the combined data set. NSU stands for `neuro-surgical unit'. } \label{Tab:data} \end{table} We combined the data, normalized every covariates (subtracted the sample mean and divided by the sample standard deviation of the full data set), and fitted a Bayesian logistic regression model in the combined data set. The prior distribution for the vector of regression parameters was chosen to be Gaussian with mean zero and a diagonal covariance matrix with the diagonal elements equal to $10$ (the diagonal elements of $\mbox{\protect\boldmath $\Lambda$}=\mbox{\protect\boldmath $\Lambda$}_\ell$ equal $\lambda=0.1$). The MAP-estimated regression parameters for the combined set, together with their estimated standard errors, were $\hat\beta_0 = -1.70\; (0.22)$ (intercept), $\hat\beta_1 = -0.15\; (0.18)$ (sex), $\hat\beta_2 = 1.36\; (0.20)$ (age), $\hat\beta_3 = 0.55\; (0.19)$ (ISS), and $\hat\beta_4 = -1.98\; (0.24)$ (GCS). \subsection{Homogeneity across population} \label{sub:homo} \noindent {\bf{Simulation procedure}}\\ In this subsection we study the performance of the BFI methodology for the case where the data in the subsets come from populations with identical characteristics, i.e.\ with identical covariate distributions and identical true parameter values (including those of the regression parameters). Since this property does not seem to hold in our data set (see Table \ref{Tab:data}), we first randomly assign each patient to one of the three subsets, keeping the sample sizes for the three subsets fixed. After this randomization we can indeed assume that the three patient groups have the same covariate distributions and regression parameters. We then perform regression analyses at subset level and at full data set level, and quantify the agreement between the results obtained on the full combined data set versus those obtained via the BFI protocol for integrating the outcomes of the subset regressions. This procedure is repeated multiple times. Below we describe the quantities used for measuring agreement. For the prediction comparisons some extra steps are taken to ensure that estimation and prediction are not based on the same data. In every cycle and every subset, 10\% of the patients are randomly left out of the estimation procedure. After obtaining the estimates for the regression coefficients with the BFI strategy, mortality probabilities are predicted for the 10\% patients that were left out (based on their covariates and estimated regression parameters). More details are given below. \bigskip \noindent {\bf{Quantities to measure agreement}}\\ The outcome variable is binary (mortality) and, therefore, a logistic regression model is fitted. The parameter of interest is the vector of regression parameters $\mbox{\protect\boldmath $\beta$}$ (including the intercept). For simplicity of interpretation of the regression parameters and the choice of the prior distribution, we first normalize every covariate by subtracting from each covariate value in the data set the sample mean of the covariate values in the combined data set and dividing by the sample standard deviation (computed in the combined data set). This is done for each covariate. Note that this sample mean and standard deviation in the combined data set can be computed without combining all local data, because they are functions of the first and second sample moments in every local subset only (and of the local sample size). Therefore, the local data themselves do not need to be combined and standardization is also possible in practice. Let $(\hat\mbox{\protect\boldmath $\beta$}_b, \hat \mbox{\protect\boldmath $A$}_b)$ and $(\hat\mbox{\protect\boldmath $\beta$}_c, \hat \mbox{\protect\boldmath $A$}_c)$ denote the estimates of $(\mbox{\protect\boldmath $\beta$}, \mbox{\protect\boldmath $A$})$ based on the BFI strategy and found after combining all data (the subscript $b$ stands for BFI, $c$ for combined data). To quantify the agreement between the regression estimates, the mean squared error (MSE) is computed for every regression coefficient with the formula: \begin{align} MSE_{\beta_k} = \frac{1}{M}\sum_{m=1}^M \Big(\hat\beta_{b,k}^{(m)}-\hat\beta_{c,k}\Big)^2. \label{eq:MSEbeta} \end{align} Here $k=1,\ldots,d$ labels the $d$ components of the vector $\mbox{\protect\boldmath $\beta$}$, and the superscript $m$ labels the $M$ independent randomization cycles of the patients over the three subsets. Note that the values $\hat\beta_{c,k}$ are the same in every cycle (i.e.\ is independent of $m$), since this estimate is based on the combined data. A small value of $MSE_{\beta_k}$ means that there is hardly any loss when computing the MAP estimates with the BFI method (i.e.\ without combining all the data). Furthermore, the MSE is calculated for the square root of every diagonal element of minus the inverse of the curvature matrix (representing estimators of the expected errors in the regression coefficients): \begin{align} MSE_{A_k} = \frac{1}{M}\sum_{m=1}^M \Big(\sqrt{((\hat\mbox{\protect\boldmath $A$}_{b}^{(m)})^{-1})_{kk}} -\sqrt{(\hat\mbox{\protect\boldmath $A$}_{c}^{-1})_{kk}}\Big)^2. \label{eq:MSEA} \end{align} For testing the accuracy of BFI's patient outcome predictions we use similar quantities. For the 10\% individuals that were left out from the estimation part, the prediction probabilities are estimated. In each cycle $m$, for an individual $i$ from center $\ell$, these probabilities are computed as \begin{eqnarray} \hat p_{b,\ell,i}^{(m)} = \frac{\exp((\hat\mbox{\protect\boldmath $\beta$}^{(m)}_{b})^t \mbox{\protect\boldmath $x$}_{\ell,i})}{1+\exp((\hat\mbox{\protect\boldmath $\beta$}^{(m)}_{b})^t \mbox{\protect\boldmath $x$}_{\ell,i})},~~~~~~~~ \hat p_{c,\ell,i}^{(m)} = \frac{\exp((\hat\mbox{\protect\boldmath $\beta$}^{(m)}_{c})^t \mbox{\protect\boldmath $x$}_{\ell,i})}{1+\exp((\hat\mbox{\protect\boldmath $\beta$}^{(m)}_{c})^t \mbox{\protect\boldmath $x$}_{\ell,i})} \label{eq:probabilities} \end{eqnarray} The estimators $\hat{\mbox{\protect\boldmath $\beta$}}^{(m)}_{b}$ and $\hat{\mbox{\protect\boldmath $\beta$}}^{(m)}_{c}$ are now both obtained from 90\% of the patients (a selection that is different for each cycle $m$, so both depend on $m$). To compare the results from the two regression routes (regression after data integration versus BFI recombination of subset results), we compute \begin{align} MSE_p = \frac{1}{37 M} \sum_{m=1}^M \sum_{\ell=1}^L \sum_{i\in S_\ell^{(m)}} \Big(\hat p_{b,\ell,i}^{(m)}-\hat p_{c,\ell,i}^{(m)}\Big)^2, \label{exp:MSEp} \end{align} where $S_\ell^{(m)}$ is the set of indices of individuals selected for prediction in subset $\ell$ in cycle $m$. The value of 37 is equal to 10\% of the total sample size, and hence gives the number of individuals selected for prediction in every cycle. \bigskip \noindent {\bf{Results: Parameter estimation}}\\ The prior distribution for the vector of regression parameters $\mbox{\protect\boldmath $\beta$}$ is chosen to be multivariate Gaussian with mean zero and a diagonal covariance matrices $\mbox{\protect\boldmath $\Lambda$}^{-1}=\mbox{\protect\boldmath $\Lambda$}_\ell^{-1}$ of which every element equals $\lambda$. In every subset $D_\ell$ we fit a logistic regression model with the same prior (i.e.\ $\mbox{\protect\boldmath $\Lambda$}_\ell=\mbox{\protect\boldmath $\Lambda$}$ for all $\ell$), and we aggregate the results by applying the formulae in (\ref{eq:recombination_formulae}). The $MSE_{\beta_k}$ are in the upper part of Table \ref{Table:MSEHomo}. \begin{table} \footnotesize \begin{center} \begin{tabular}{|l|l|r|r|r|r|r|} \hline & & intercept & sex & age & ISS & GCS \\ \hline \hline $\lambda=0.1$ & $\hat\beta_c ~~ (SE)$ & -1.70 (0.22) & -0.15 (0.18) & 1.36 (0.20) & 0.55 (0.19) & -1.98 (0.24) \\ & $MSE_{\beta_k}$ & 1.11$\times 10^{-2}$ & 0.06$\times 10^{-2}$& 0.890$\times 10^{-2}$ & 0.10$\times 10^{-2}$ & 2.00$\times 10^{-2}$\\ & $MSE_{A_k}$ & 0.13$\times 10^{-4}$ & 0.25$\times 10^{-4}$ & 0.13$\times 10^{-4}$ & 0.11$\times 10^{-4}$ & 0.25$\times 10^{-4}$ \\ \hline $\lambda=0.01$ & $\hat\beta_c ~~ (SE)$ & -1.72 (0.22) & -0.15 (0.18) & 1.37 (0.21) & 0.55 (0.19) & -2.00 (0.24) \\ & $MSE_{\beta_k}$ &1.57$\times 10^{-2}$ & 0.10$\times 10^{-2}$ & 1.26$\times 10^{-2}$ & 0.17$\times 10^{-2}$ & 2.77$\times 10^{-2}$ \\ & $MSE_{A_k}$ &0.43 $\times 10^{-4}$ & 0.49$\times 10^{-4}$ & 0.29$\times 10^{-4}$ & 0.20$\times 10^{-4}$ & 0.28$\times 10^{-4}$ \\ \hline \hline $\lambda_1=1, \lambda_2=0.1$ & $MSE_{\beta_k}$ & $1.64\times 10^{-2}$ & $0.05\times 10^{-2}$ & $1.34\times 10^{-2}$ & $0.11\times 10^{-2}$ & $2.75\times 10^{-2}$\\ $\lambda_3=\lambda=0.01$ & $MSE_{A_k}$ & $1.57\times 10^{-4}$ & $0.12\times 10^{-4}$ & $1.16\times 10^{-4}$ & $0.28\times 10^{-4}$ & $2.85\times 10^{-4}$ \\ \hline \hline $\lambda=1$ & $\hat\beta_c ~~ (SE)$ & -1.58 (0.20)& -0.13 (0.17) & 1.25 (0.19)& 0.54 (0.18)& -1.84 (0.21)\\ & $MSE_{\beta_k}$ & 3.01$\times 10^{-2}$ & 0.04$\times 10^{-2}$ & 2.69$\times 10^{-2}$ & 0.19$\times 10^{-2}$ & 5.32 $\times 10^{-2}$\\ & $MSE_{A_k}$ & 15.87$\times 10^{-4}$ & 2.79$\times 10^{-4}$ & 10.91$\times 10^{-4}$ & 4.02$\times 10^{-4}$ & 20.37$\times 10^{-4}$\\ \hline $\lambda=0.1$ & $MSE_{\beta_k}$ & 7.42 $\times 10^{-2}$ & 0.20 $\times 10^{-2}$ & 6.54 $\times 10^{-2}$ & 0.50 $\times 10^{-2}$ & 14.50 $\times 10^{-2}$\\ & $MSE_{A_k}$ & 0.35 $\times 10^{-4}$& 2.23 $\times 10^{-4}$& 0.35$\times 10^{-4}$ & 0.41 $\times 10^{-4}$ & 1.25$\times 10^{-4}$ \\ \hline $\lambda=0.01$ & $MSE_{\beta_k}$ &18.34$\times 10^{-2}$ & 0.45$\times 10^{-2}$& 14.20$\times 10^{-2}$ & 1.10$\times 10^{-2}$ & 31.02$\times 10^{-2}$ \\ & $MSE_{A_k}$ & 6.37$\times 10^{-4}$& 9.67$\times 10^{-4}$& 3.93$\times 10^{-4}$& 3.46$\times 10^{-4}$& 2.01$\times 10^{-4}$ \\ \hline \end{tabular} \caption[width=1cm]{ \small Results of the simulation study 1) for homogeneous populations (rows 1 and 2) as described in Subsection \ref{sub:homo};\; 2) for different priors in the subsets (row 3) with $\lambda_i$ the value in subset $i$ and $\lambda$ in the combined data set (Subsection \ref{sub:homo});\; 3) with small subsets (rows 4-6) as described in Subsection \ref{sub:small}. In all cases $M=1000$. } \label{Table:MSEHomo} \end{center} \end{table} In this table we see that the estimates based on the BFI strategy are accurate. As expected, for higher values of $\lambda$ the estimates of the regression coefficients are closer to zero, and the estimated standard deviations are smaller. Furthermore, the $MSE$ values are also closer to zero for higher values of $\lambda$. However, better agreement does not necessarily mean that the estimates are closer to the true values. \bigskip \noindent {\bf{Results: Prediction}}\\ The BFI-estimated logistic regression model is used to predict mortality for new patients. To quantify its prediction performance we carried out simulation studies as described above: in each of the $M=1000$ simulation cycles 10\% of the patients were left out from estimation, and used instead to predict the mortality probability. The quantity $MSE_p$ in (\ref{exp:MSEp}) was calculated, resulting in the values $MSE_p=0.24\times 10^{-3}$ for $\lambda=0.01$, and $MSE_p=0.16 \times 10^{-3}$ for $\lambda=0.1$. In addition, in Figure \ref{fig:PredProb}(a) we show a scatter plot with the predicted probabilities based on the BFI model (vertical axis) and the combined data model (horizontal axis), for $\lambda=0.1$. This plot shows excellent agreement. As expected for the present model definitions, the data points in Figure \ref{fig:PredProb}(a) are not distributed homogeneously along the diagonal, since Gaussian distributed uncertainty in parameter estimates is mapped nonlinearly to probabilities via the expressions in (\ref{eq:probabilities}). This effect is more clearly present when the local data sets are smaller (next subsection), where the estimate uncertainties are larger. \begin{figure} \begin{center} \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=5cm,height=6cm]{HomoLambda0.1.pdf}\; \vspace{-6mm} \caption{} \end{subfigure} \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=5cm,height=6cm]{HeteroLambda0.1.pdf}\; \vspace{-6mm} \caption{} \end{subfigure} \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=5cm,height=6cm]{FigMissingCov.pdf} \vspace{-6mm} \caption{} \end{subfigure} \vspace{-4mm} \caption{\small Prediction probabilities based on the estimates $\hat\mbox{\protect\boldmath $\beta$}_{b}$ (BFI, vertical axis) versus those based on $\hat\mbox{\protect\boldmath $\beta$}_c$ (regression on combined data set, horizontal axis), for $\lambda=0.1$. Perfect agreement corresponds to all points being located on the diagonal. (a) Homogeneous populations. (b) Heterogenous populations. (c) Missing covariate. } \label{fig:PredProb} \end{center} \end{figure} \bigskip \noindent {\bf{Results: parameter estimation with different priors}}\\ We also considered the situation in which the priors for the vector of regression parameters $\mbox{\protect\boldmath $\beta$}$ in the subsets are different. We took multivariate Gaussian distributions with mean zero again, but with inverse covariance matrices with on the diagonal $\lambda_1=1, \lambda_2=0.1$ and $\lambda_3=0.01$ for the three subsets and $\lambda=0.01$ for the combined data set (so the lower the sample size the stronger the regularisation). The $MSE_{\beta_k}$ are in row 3 of Table \ref{Table:MSEHomo}. The estimates based on the BFI strategy are accurate. We also performed a simulation study for mortality prediction. The results are very similar to those in Figure \ref{fig:PredProb}(a). \subsection{Small subsets} \label{sub:small} If the sample sizes of the subsets are small compared to the number of covariates in the model, there is a risk of overfitting. Our present data set consists of three data subsets, ranging in size from 49 to 216 patients. Especially the subset with 49 patients is small, and overfitting is here addressed by taking values for $\lambda$ that are not (too) close to zero. In this subsection we consider a more extreme situation in which multiple subsets are small. We create such data subsets from our original hospital data by randomly dividing all patients over eight subsets of size 40 each, plus one additional subset of 51 patients. The combined data set $D$ remains the same, hence the same is true for all estimates of regression parameters based on this combined data set. We now perform the simulation study described in Subsection \ref{sub:homo} to study the effect of modest subset sample sizes on the estimation and prediction agreement. We do this for different values of $\lambda$. The values of $MSE_{\beta_k}$ are given in Table \ref{Table:MSEHomo}. For the patient outcome predictions we found the following MSE values: $MSE_p=3.04 \times 10^{-3}$ for $\lambda=0.01$, $MSE_p=1.08 \times 10^{-3}$ for $\lambda=0.1$ and $MSE_p=0.43\times 10^{-3}$ for $\lambda=1$. Upon increasing the value of $\lambda$, the estimates of the regression parameters are shrunk towards zero and agreement increases. This can be seen by the decreasing values of $MSE_p$, and also from the scatter plots in Figure \ref{fig:homosmall}. For $\lambda=0.01$ (left plot in Figure \ref{fig:homosmall}) the agreement is weaker, and one observes what appears to be overfitting (rotation of the data cloud relative to the diagonal). For larger values of $\lambda$ the agreement between BFI recombination and regression results on the full data set improves, as expected. As mentioned before, better agreement does not necessarily mean that the estimates are closer to the true values; we just conclude that the BFI protocol reliably predicts the results of regression on the integrated data set. We repeated the simulation study for $\lambda=0.01$ in the combined data set and $\lambda=0.1$ or $\lambda=1$ in the subsets. The results are very similar as before. \begin{figure} \begin{center} \includegraphics[width=5cm,height=6cm] {HomoSmallLambda0.01.pdf} \includegraphics[width=5cm,height=6cm] {HomoSmallLambda0.1.pdf} \includegraphics[width=5cm,height=6cm] {HomoSmallLambda1.pdf} \vspace{-6mm} \caption{\small Prediction probabilities based on the estimates $\hat\mbox{\protect\boldmath $\beta$}_{b}$ (BFI protocol, vertical axis) versus those based on $\hat\mbox{\protect\boldmath $\beta$}_c$ (regression on combined data set, horizontal axis), in the setting with small sample sizes in nine subsets. Here $n_\ell=40$ for $\ell=1\ldots 8$, and $n_9=51$. From left to right: $\lambda=0.01$, $\lambda=0.1$, and $\lambda=1$.} \label{fig:homosmall} \end{center} \end{figure} \subsection{Heterogeneity across populations} \label{sub:diff} \noindent {\bf{Different covariate distributions and effects}}\\ In this subsection we no longer use randomizations, but return to the original data to study agreement between BFI and direct regression on the combined set in terms of parameter estimates and outcome predictions, in the setting where (as is the case in our original data) the populations from the different hospital types are expected to differ. The combined set priors and subset priors were chosen to be identical, Gaussian with zero average and $\mbox{\protect\boldmath $\Lambda$}=\mbox{\protect\boldmath $\Lambda$}_\ell$ for all $\ell$, with $\mbox{\protect\boldmath $\Lambda$}$ a diagonal matrix with $\lambda$ on the diagonal. The parameter estimates obtained via the BFI protocol and those found via regression on the combined data set are given in the Table \ref{tab:MSEhetero}. From this table we conclude that, even if there are differences in the covariate effects between the populations where the subsets where sampled from, the BFI-estimated regression parameters are still very similar to those that would have been found upon first combining all data in a single set. For the comparisons of the predictions, as before in every cycle 10\% of the individuals are selected randomly for prediction, and not used for estimation. We quantify the agreement in patient outcome probabilities again by (\ref{exp:MSEp}). For $\lambda=0.1$ we found $MSE_p=0.36\times 10^{-3}$. A scatter plot for the comparison of the prediction probabilities is shown in Figure \ref{fig:PredProb}(b). It can be seen that the agreement between the predictions is high.\\ \begin{table} \footnotesize \begin{center} \begin{tabular}{|l|c|c|c|c|c|} \hline & intercept & sex & age & ISS & GCS \\ \hline\hline subset 1 & -2.82 (0.94) & -1.74 (0.90) & 1.54 (0.56) & 1.90 (0.70) & -2.06 (0.65) \\ subset 2 & -0.97 (0.33) & -0.34 (0.31) & 1.90 (0.45) & 0.52 (0.36) & -1.82 (0.40)\\ subset 3 & -2.22 (0.36) & 0.07 (0.25) & 1.27 (0.29) & 0.30 (0.26) & -2.36 (0.40)\\ \hline\hline BFI ($\mbox{\protect\boldmath $\beta$}_b$) & -1.51 (0.22) & -0.12 (0.18) & 1.23 (0.21) & 0.51 (0.19)& -1.74 (0.24)\\ Combined ($\mbox{\protect\boldmath $\beta$}_c$) & -1.70 (0.22) & -0.15 (0.18) & 1.36 (0.20) & 0.55 (0.19) & -1.98 (0.24)\\ \hline \end{tabular} \vspace{-2mm} \caption{\small Estimates of $\mbox{\protect\boldmath $\beta$}$ in each subset, based on the BFI strategy, and obtained after first combining the data. Here $\lambda=0.1$. The subsets represent: peripheral hospital without NSU (subset 1), peripheral hospital with NSU (subset 2) and academic medical centers (subset 3).} \label{tab:MSEhetero} \end{center} \end{table} \medskip \noindent {\bf{Different prevalence}}\\ In Table \ref{Tab:data} we see that the mortalities in the three subsets (representing hospital types) differ. This may not be explained completely by the covariates in the model. The prevalence of mortality is reflected in the intercepts of the logistic regression models for the three subsets. To address this observed mortality difference we allow the intercept to vary across hospital types, and we aggregate the estimates from the different subsets as explained in Subsection \ref{subsec:nuisance}. This yields a single logistic regression model that includes a hospital type specific intercept, but no general intercept. For comparison, we also fitted a logistic regression model with hospital type intercepts based on the combined data (instead of a model with a general intercept and a reference hospital type). The combined set priors and subset priors were chosen to be identical, Gaussian with zero mean and $\mbox{\protect\boldmath $\Lambda$}=\mbox{\protect\boldmath $\Lambda$}_\ell$ for all $\ell$, and $\mbox{\protect\boldmath $\Lambda$}$ a diagonal matrix with $\lambda$ on the diagonal. For $\lambda=0.1$ and $\lambda=1$ the results are shown in Table \ref{tab:diffprev}. We see very satisfactory agreement between the estimates. We also see, as expected, that the estimates $\hat\mbox{\protect\boldmath $\beta$}_c$ are typically shrunk to zero for $\lambda=1$ more than for $\lambda=0.1$. \begin{table} \footnotesize \begin{center} \begin{tabular}{|l|l|c|c|c|c|c|c|c|} \hline $\lambda$ & & subset 1 & subset 2 & subset 3 & sex & age & ISS & GCS \\ \hline\hline $\lambda=0.1$ & BFI ($\mbox{\protect\boldmath $\beta$}_b$) & -1.45 & -1.07 & -1.94 & -0.12 & 1.30 & 0.53 & -1.82 \\ & Combined ($\mbox{\protect\boldmath $\beta$}_c$) & -1.61 & -1.15 & -2.09 & -0.16 & 1.40 & 0.57 & -1.96 \\ \hline $\lambda=1$ & BFI ($\mbox{\protect\boldmath $\beta$}_b$)& -1.17 & -0.94 & -1.79 & -0.13 & 1.20 & 0.54 & -1.69 \\ & Combined ($\mbox{\protect\boldmath $\beta$}_c$) & -1.34 & -1.10 & -1.95 & -0.14 & 1.28 & 0.55 & -1.82 \\ \hline \end{tabular} \vspace{-2mm} \caption{\small Estimates of the regression coefficients computed with the BFI strategy, and those obtained after first combining the data, when taking into account the differences in death prevalence in the three hospital types by including subset specific intercepts.} \label{tab:diffprev} \end{center} \end{table} \subsection{Sets of covariates differ across centers} In this subsection we study the performance of the BFI methodology in the situation in which one of the covariates is missing in one of the subsets, and is imputed by the data from the other subsets. We do this for the setting in which we assume that the population is homogeneous, so we first randomly assign the patients to the three subsets. Next, we delete all patient's covariate values for "GCS" in subset 1, and estimate a linear regression model with the dependent variable "GCS" and the independent variables "mortality", "sex", "age", and "ISS", based on the data from subsets 2 and 3 with the BFI strategy with identical priors with $\lambda=0.1$. This estimated model is used to predict the GCS-scores in subset 1. Next, the BFI protocol with identical priors (with $\lambda=0.1$) can be applied as discussed before. This is repeated $M=1000$ times. The outcome predictions of the BFI protocol and of regression performed on the combined data set are visualized in Figure \ref{fig:PredProb}(c). \section{Discussion} \label{sec:Discussion} In this paper we have discussed a one-shot BFI strategy for estimating parameters in parametric models, where the data in multiple centers can not be combined for analysis. This is for instance of interest in a medical setting, where the data sets in individual medical centers or hospitals are often small, and can not be combined because of privacy legislation. A major advantage of the proposed BFI strategy is that, in contrast to most FL strategies, not only parameter estimates but also the uncertainties of these estimates are computed systematically. These uncertainties reflect the differences and uncertainties in the individual centers. In medicine, complementing parameter estimates with error bars is essential in order to interpret correctly the estimation results In this study we have performed numerical simulations in multiple settings, with real medical data in which the patient outcomes were binary, and with realistic sample sizes. They reveal a very good agreement between the parameter estimates and patient outcome predictions obtained with the BFI procedure, compared to those found after first combining all data in a single integrated set. We conclude that for the given data and the chosen regression model (logistic) the inference results based on the combined data set can be computed reliably {\it a posteriori} from the inference results on the local centers; hardly any information is lost by not being able to combine the data sets. In the proposed BFI strategy we approximated the posterior parameter distribution around the MAP estimator $\hat\mbox{\protect\boldmath $\theta$}$ by a Gaussian distribution with mean $\hat\mbox{\protect\boldmath $\theta$}$ and a covariance matrix equal to minus the inverse curvature matrix in $\hat\mbox{\protect\boldmath $\theta$}$. For large sample sizes, the MAP estimator will approach the maximum likelihood estimator and minus the inverse curvature matrix will approach the Fisher information matrix (Bernstein-von Mises theorem (van der Vaart, 1989\nocite{Vaart})). If the sample sizes in the centers are small (compared to the number of covariates) these identification may no longer hold. In particular, if the sample size is close to or smaller than the number of covariates, the ML estimator will be inaccurate or not even defined, whereas the MAP estimator is still well defined by the presence of the ridge penalty in the likelihood (for a Gaussian prior). While in most of our simulations we have for simplicity used the same inverse covariance matrices for the data subsets and the combined data set, the derivations of sections 2 and 3 are in fact more general and allow these matrices to be distinct. This freedom offered by the theory to vary the covariances of the priors could for instance be employed to regularize/penalize smaller data subsets more than larger ones as was shown in subsections \ref{sub:homo} and \ref{sub:small}. In this paper we have developed and applied the BFI methodology for parametric (regression) models, and in particular for GLMs. This is not a limitation of the BFI methodology, which is also applicable in more complex models and settings, such as models for survival data that are subject to censoring, or random effects models. In particular, the development of BFI protocols for semi-parametric models, like the Cox proportional hazards model (Cox, 1972\nocite{Cox}) which is widely used in medical data analysis, will be our next project. In conclusion, we have shown that by harnessing systematically and accurately the cumulative power of multiple disjunct data sets without actually combining these data sets, the BFI methodology can reduce significantly the sizes of data sets required for extracting reliably statistically significant predictive or prognostic patterns (if such patterns are present). While with conventional methods only very strong regularities and associations can be identified in small data sets, with the new approaches more subtle ones may become detectable. It may thereby bring rare diseases, and in particular rare cancers, closer to more common disease types in terms of our ability to predict outcomes. \bigskip \noindent {\bf{Acknowledgements}}\\ We thank J. Draaisma for making his data available. \bigskip \noindent {\bf{Funding}}\\ This research was supported by an unrestricted grant of Stichting Hanarth Fonds, The Netherlands. \\ \vspace*{-10mm}
{ "redpajama_set_name": "RedPajamaArXiv" }
8,946
Джеймс Філіп Мі́лнер (, 4 січня 1986, Лідс, Англія) — англійський футболіст, фланговий півзахисник збірної Англії та клубу «Ліверпуль». Клубна кар'єра Вихованець футбольної школи клубу «Лідс Юнайтед». Дорослу футбольну кар'єру розпочав у 16-річному віці 2002 року в основній команді того ж клубу, в якій провів загалом два сезони, взявши участь у 48 матчах чемпіонату. 2003 року провів декілька матчів у складі нижчолігового «Свіндон Таун», де виступав на умовах оренди. 2004 року перейшов до «Ньюкасл Юнайтед», досить регулярно виходив на поле у складі основної команди клубу, однак невдовзі після початку сезону 2005-06 був відправлений в оренду до «Астон Вілла», де відіграв решту сезону англійської першості. Після повернення з оренди провів у «Ньюкаслі» ще два сезони, після чого влітку 2008 року перейшов до «Астон Вілли», вже на умовах повноцінного контракту. До складу клубу «Манчестер Сіті» приєднався 2010 року. Встиг відіграти за команду з Манчестера 147 матчі в національному чемпіонаті. 4 червня 2015 року перейшов до «Ліверпуля» як вільний агент. 24 квітня 2018 року у матчі Ліги чемпіонів УЄФА проти «Роми» (5:2) віддав гольову передачу, яка стала 9-ю впродовж сезону, і цим він встановив рекорд турніру. Виступи за збірні Протягом 2004–2009 років залучався до складу молодіжної збірної Англії. На молодіжному рівні зіграв у 46 офіційних матчах, забив 9 голів. 2009 року дебютував в офіційних матчах у складі національної збірної Англії. Наразі провів у формі головної команди країни 23 матчі. У складі збірної був учасником чемпіонату світу 2010 року у ПАР. Статистика виступів Статистика клубних виступів Досягнення Чемпіон Англії: «Манчестер Сіті»: 2011-12, 2013-14 «Ліверпуль»: 2019-20 Володар кубка Англії: «Манчестер Сіті»: 2010-11 «Ліверпуль»: 2021-22 Володар Кубка ліги: «Манчестер Сіті»: 2013-14 «Ліверпуль»: 2021-22 Володар Суперкубка Англії: «Манчестер Сіті»: 2012 «Ліверпуль»: 2022 Переможець Ліги чемпіонів: «Ліверпуль»: 2018-19 Володар Суперкубка УЄФА: «Ліверпуль»: 2019 Чемпіон світу серед клубів: «Ліверпуль»: 2019 Примітки Посилання Профіль гравця на SoccerBase.com Англійські футболісти Гравці молодіжної збірної Англії з футболу Футболісти «Лідс Юнайтед» Футболісти «Свіндон Тауна» Футболісти «Ньюкасл Юнайтед» Футболісти «Астон Вілли» Футболісти «Манчестер Сіті» Футболісти «Ліверпуля» Уродженці Лідса
{ "redpajama_set_name": "RedPajamaWikipedia" }
5,362
@implementation MadvertiseSDKSampleAppDelegate_iPad - (void)dealloc { [super dealloc]; } @end
{ "redpajama_set_name": "RedPajamaGithub" }
487
What Do Metallica and ABBA Have in common? Metallica are on tour! And will be in Boise November 28th. When in Stockholm, Rob Trujillo and Kirk Hammet took a moment to pay tribute to a Swedish band. ABBA. Yep, they did a version of Dancing Queen that, well, I'm not sure how to describe it, so watch for yourself!
{ "redpajama_set_name": "RedPajamaC4" }
8,671
# A Nancy Willard Reader ## Selected Poetry and Prose ### Nancy Willard FOR ERIC AND JAMES # Contents Publisher's Note The Reader Inquires, the Author Answers POEMS Questions My Son Asked Me, Answers I Never Gave Him In Praise of Unwashed Feet When There Were Trees How to Stuff a Pepper Moss Onionlight The Potato Picker Roots How the Hen Sold Her Eggs to the Stingy Priest A Wreath to the Fish A Humane Society Marriage Amulet For You, Who Didn't Know In Praise of ABC Walking Poem Angels in Winter Carpenter of the Sun One for the Road [Little Elegy with Books and Beasts From _19 Masks for the Naked Poet_](34-chap21.xhtml#chap21) The Poet Invites the Moon for Supper The Poet Takes a Photograph of His Heart The Poet Turns His Enemy into a Pair of Wings [The Poet's Wife Watches Him Enter the Eye of the Snow From _The Ballad of Biddy Early_](38-chap25.xhtml#chap25) The Ballad of Biddy Early How the Magic Bottle Gave Biddy Its Blessing Charm of the Gold Road, the Silver Road, and the Hidden Road How the Queen of the Gypsies Met Trouble-and-Pain How Biddy Hid Mick the Moonlighter's Sleep in Her Sleeve Biddy Early Makes a Long Story Short [Song from the Far Side of Sleep From _A Visit to William Blake's Inn_](45-chap32.xhtml#chap32) William Blake's Inn for Innocent and Experienced Travelers Blake Leads a Walk on the Milky Way The King of Cats Sends a Postcard to His Wife The Tiger Asks Blake for a Bedtime Story Epilogue Three from the Sports Page "Buffalo Climbs Out of Cellar" "Saints Lose Back" "Divine Child Rolls On" FICTION The Hucklebone of a Saint The Doctrine of the Leather-Stocking Jesus Theo's Girl Sinner, Don't You Waste That Sunday [The Life of a Famous Man From _Things Invisible to See_](10-chap47.xhtml#chap47) Salvage for Victory FOUR LECTURES ON WRITING The Well-tempered Falsehood: The Art of Storytelling How Poetry Came into the World and Why God Doesn't Write It Telling Time Close Encounters of the Story Kind Acknowledgments About the Author # Publisher's Note Long before they were ever written down, poems were organized in lines. Since the invention of the printing press, readers have become increasingly conscious of looking at poems, rather than hearing them, but the function of the poetic line remains primarily sonic. Whether a poem is written in meter or in free verse, the lines introduce some kind of pattern into the ongoing syntax of the poem's sentences; the lines make us experience those sentences differently. Reading a prose poem, we feel the strategic absence of line. But precisely because we've become so used to looking at poems, the function of line can be hard to describe. As James Longenbach writes in _The Art of the Poetic Line_ , "Line has no identity except in relation to other elements in the poem, especially the syntax of the poem's sentences. It is not an abstract concept, and its qualities cannot be described generally or schematically. It cannot be associated reliably with the way we speak or breathe. Nor can its function be understood merely from its visual appearance on the page." Printed books altered our relationship to poetry by allowing us to see the lines more readily. What new challenges do electronic reading devices pose? In a printed book, the width of the page and the size of the type are fixed. Usually, because the page is wide enough and the type small enough, a line of poetry fits comfortably on the page: What you see is what you're supposed to hear as a unit of sound. Sometimes, however, a long line may exceed the width of the page; the line continues, indented just below the beginning of the line. Readers of printed books have become accustomed to this convention, even if it may on some occasions seem ambiguous—particularly when some of the lines of a poem are already indented from the left-hand margin of the page. But unlike a printed book, which is stable, an ebook is a shape-shifter. Electronic type may be reflowed across a galaxy of applications and interfaces, across a variety of screens, from phone to tablet to computer. And because the reader of an ebook is empowered to change the size of the type, a poem's original lineation may seem to be altered in many different ways. As the size of the type increases, the likelihood of any given line running over increases. Our typesetting standard for poetry is designed to register that when a line of poetry exceeds the width of the screen, the resulting run-over line should be indented, as it might be in a printed book. Take a look at John Ashbery's "Disclaimer" as it appears in two different type sizes. Each of these versions of the poem has the same number of lines: the number that Ashbery intended. But if you look at the second, third, and fifth lines of the second stanza in the right-hand version of "Disclaimer," you'll see the automatic indent; in the fifth line, for instance, the word _ahead_ drops down and is indented. The automatic indent not only makes poems easier to read electronically; it also helps to retain the rhythmic shape of the line—the unit of sound—as the poet intended it. And to preserve the integrity of the line, words are never broken or hyphenated when the line must run over. Reading "Disclaimer" on the screen, you can be sure that the phrase "you pause before the little bridge, sigh, and turn ahead" is a complete line, while the phrase "you pause before the little bridge, sigh, and turn" is not. Open Road has adopted an electronic typesetting standard for poetry that ensures the clearest possible marking of both line breaks and stanza breaks, while at the same time handling the built-in function for resizing and reflowing text that all ereading devices possess. The first step is the appropriate semantic markup of the text, in which the formal elements distinguishing a poem, including lines, stanzas, and degrees of indentation, are tagged. Next, a style sheet that reads these tags must be designed, so that the formal elements of the poems are always displayed consistently. For instance, the style sheet reads the tags marking lines that the author himself has indented; should that indented line exceed the character capacity of a screen, the run-over part of the line will be indented further, and all such runovers will look the same. This combination of appropriate coding choices and style sheets makes it easy to display poems with complex indentations, no matter if the lines are metered or free, end-stopped or enjambed. Ultimately, there may be no way to account for every single variation in the way in which the lines of a poem are disposed visually on an electronic reading device, just as rare variations may challenge the conventions of the printed page, but with rigorous quality assessment and scrupulous proofreading, nearly every poem can be set electronically in accordance with its author's intention. And in some regards, electronic typesetting increases our capacity to transcribe a poem accurately: In a printed book, there may be no way to distinguish a stanza break from a page break, but with an ereader, one has only to resize the text in question to discover if a break at the bottom of a page is intentional or accidental. Our goal in bringing out poetry in fully reflowable digital editions is to honor the sanctity of line and stanza as meticulously as possible—to allow readers to feel assured that the way the lines appear on the screen is an accurate embodiment of the way the author wants the lines to sound. Ever since poems began to be written down, the manner in which they ought to be written down has seemed equivocal; ambiguities have always resulted. By taking advantage of the technologies available in our time, our goal is to deliver the most satisfying reading experience possible. # The Reader Inquires, the Author Answers Dear Ms. Willard, A friend of mine recently loaned me a copy of your novel, _Things Invisible to See._ I notice that you have the same name as the person who wrote _A Visit to William Blake's Inn: Poems for Innocent and Experienced Travelers._ Are you the same person? If so, why do you work in such different genres? Who is your audience? Sincerely, A.R. Dear A.R., Yes, the same person wrote the two books you mention, and yes, I am that person. If you happen to run across a collection of poems called _Water Walker_ or another one called _Household Tales of Moon and Water,_ I'll take responsibility for those, too. Also for a couple of collections of short stories. To answer your question about working in different genres: each work chooses its own form, and I try to follow its lead—story, poem, novel, or essay. I hope the connections between them are clear. They all come from the same well, a metaphor I don't take lightly. When I was growing up in Ann Arbor, Michigan, I heard plenty of stories about folks coming into the world and going out of it and maybe coming back once in a while to keep an eye on us, the living. Call them guardians, ancestors, spirits; they glistened before us in a web of words: their stories were the gifts they handed down to us. Behind their gifts lay questions: _What will you give to those who come after? Who do you want to be?_ Why, the village storyteller, of course. The children sit in the front rows, the parents and the grandparents gather in the back. May my story or poem be as lucky as a lost traveler whose road finds him and leads him home. May it delight travelers, like a gift from the ancestors. # POEMS ## Questions My Son Asked Me, Answers I Never Gave Him 1. Do gorillas have birthdays? _Yes. Like the rainbow, they happen._ _Like the air, they are not observed._ 2. Do butterflies make a noise? _The wire in the butterfly's tongue_ _hums gold._ _Some men hear butterflies_ _even in winter._ 3. Are they part of our family? _They forgot us, who forgot how to fly._ 4. Who tied my navel? Did God tie it? _God made the thread:_ O _man, live forever!_ _Man made the knot: enough is enough._ 5. If I drop my tooth in the telephone _will it go through the wires and bite someone's ear?_ _I have seen earlobes pierced by a tooth of steel._ _It loves what lasts._ _It does not love flesh._ _It leaves a ring of gold in the wound._ 6. If I stand on my head _will the sleep in my eye roll up into my head?_ _Does the dream know its own father?_ _Can bread go back to the field of its birth?_ 7. Can I eat a star? _Yes, with the mouth of time_ _that enjoys everything._ 8. Could we Xerox the moon? _This is the first commandment:_ _I am the moon, thy moon._ _Thou shalt have no other moons before thee._ 9. Who invented water? _The hands of the air, that wanted to wash each other._ 10. What happens at the end of numbers? _I see three men running toward a field._ _At the edge of the tall grass, they turn into light._ 11. Do the years ever run out? _God said, I will break time's heart._ _Time ran down like an old phonograph._ _It lay flat as a carpet._ _At rest on its threads, I am learning to fly._ ## In Praise of Unwashed Feet Because I can walk over hot coals, because I can make doctors turn green and shoe salesmen avert their eyes, because I have added yet another use to the hundred and one uses of Old Dutch Cleanser; because they tell me the secrets of miners and small boys, because they keep me in good standing and continual grace in the ashes and dust of the last rites, because they carry my great bulk without complaint, because they don't smell; because it's taken me years to grow my own shoes, like the quaint signatures of truth, because they are hard and gentle as lion's pads, pard's paw, mule's hoof and cock's toes, because they can't make poems or arguments but speak in an aching tongue or not at all and come home at night encrusted with stones, calluses, grass, all that the head forgets and the foot knows. ## When There Were Trees I can remember when there were trees, great tribes of spruces who deckled themselves in light, beeches buckled in pewter, meeting like Quakers, the golden birch, all cutwork satin, courtesan of the mountains; the paper birch trying all summer to take off its clothes like the swaddlings of the newborn. The hands of a sassafras blessed me. I saw maples fanning the fire in their stars, heard the coins of the aspens rattling like teeth, saw cherry trees spraying fountains of light, smelled the wine my heel pressed from ripe apples, saw a thousand planets bobbing like bells on the sleeve of the sycamore, chestnut, and lime. The ancients knew that a tree is worthy of worship. A few wise men from their tribes broke through the sky, climbing past worlds to come and the rising moon on the patient body of the tree of life, and brought back the souls of the newly slain, no bigger than apples, and dressed the tree as one of themselves and danced. Even the conquerors of this country lifted their eyes and found the trees more comely than gold: _Bright green trees,_ _the whole land so green it is pleasure to look on it,_ _and the greatest wonder to see the diversity._ _During that time, I walked among trees,_ _the most beautiful things I had ever seen.*_ Watching the shadows of trees, I made peace with mine. Their forked darkness gave motion to morning light. Every night the world fell to the shadows, and every morning came home, the dogwood floating its petals like moons on a river of air, the oak kneeling in wood sorrel and fern, the willow washing its hair in the stream. And I saw how the logs from the mill floated downstream, saw otters and turtles that rode them, and though I heard the saws whine in the woods I never thought men were stronger than trees. I never thought those tribes would join the buffalo and the whale, the leopard, the seal, the wolf, and the folk of this country who knew how to sing them. Nothing I ever saw washed off the sins of the world so well as the first snow dropping on trees. We shoveled the pond clear and skated under their branches, our voices muffled in their huge silence. The trees were always listening to something else. They didn't hear the beetle with the hollow tooth grubbing for riches, gnawing for empires, for gold. Already the trees are a myth, half gods, half giants in whom nobody believes. But I am the oldest woman on earth, and I can remember when there were trees. * Adapted from the journals of Christopher Columbus, as rendered in William Carlos Williams's _In the American Grain._ ## How to Stuff a Pepper Now, said the cook, I will teach you how to stuff a pepper with rice. Take your pepper green, and gently, for peppers are shy. No matter which side you approach, it's always the backside. Perched on green buttocks, the pepper sleeps. In its silk tights, it dreams of somersaults and parsley, of the days when the sexes were one. Slash open the sleeve as if you were cutting a paper lantern, and enter a moon, spilled like a melon, a fever of pearls, a conversation of glaciers. It is a temple built to the worship of morning light. I have sat under the great globe of seeds on the roof of that chamber, too dazzled to gather the taste I came for. I have taken the pepper in hand, smooth and blind, a runt in the rich evolution of roses and ferns. You say I have not yet taught you to stuff a pepper? Cooking takes time. Next time we'll consider the rice. ## Moss A green sky underfoot: the skin of moss holds the footprints of star-footed birds. With moss-fingers, with filigree they line their nests in the forks of the trees. All around, the apples are falling, the leaves snap, the sun moves away from the earth. Only the moss stays, decently covers the roots of things, itself rooted in silence: rocks coming alive underfoot, rain no man heard fall. Moss, stand up for us, the small birds and the great sun. You know our trees and apples, our parrots and women's eyes. Keep us in your green body, laid low and still blossoming under the snow. ## Onionlight Sacks crammed with light, layer on luminous layer, an underworld calendar, the peeled pages faintly lined but printed without month or measure and pure as the damp kiss of a pearl, as if the rings in an old tree should suddenly separate and bracelet the axe; I have stooped among onions all morning, hunting these flightless birds as they perched among roots. I have yanked them out by the tail and dropped them into my bag like chickens and pulled away the thin paper of their last days, pale winegold, a silken globe, pungent, striped with the pale longitude of silence. Now over my door they shimmer in knobby garlands, gregarious in chains like a string of lights on the boardwalks of heaven where an old man who loved his garden understands everything. ## The Potato Picker The plant lifts easily now, like an old tooth. I can free it from the rows of low hills, hills like the barrows of old kings where months ago, before anything grew or was, we hid the far-sighted eyes of potatoes. They fingered forth, blossomed, and shrank, and did their dark business under our feet. And now it's all over. Horse nettles dangle their gold berries. Sunflowers, kindly giants in their death-rattle turn stiff as streetlamps. Pale cucumbers swell to alabaster lungs, while marigolds caught in the quick frost go brown, and the scarred ears of corn gnawed by the deer lie scattered like primitive fish. The life boats lifted by milkweed ride light and empty, their sailors flying. This is the spot. I put down my spade, I dig in, I uncover the scraped knees of children in the village of potatoes, and the bald heads of their grandfathers. I enter the potato mines. ## Roots This squash is my good cousin, says the vegetable man, rolling his pushcart through November. These parsnips are first class. I recommend with my whole heart. I know the family. Believe me, lady, I know what I'm talking. And I give you a good price. I throw in the carrots free. Carrots like this you got? So what you want? I wrap in the best Yiddish newspaper. A dollar a year. Takes me ten minutes to read it, an hour to read the English. Potatoes you need, maybe? My wife says I eat too many potatoes. In Poland, in war, we ate potatoes, soup, baked, boiled. All my family was ploughed under except me. So what can I say to someone that he don't like potatoes? Positively last chance, because tomorrow it might snow. In winter I don't come. Look for me when the snow goes, and if I don't come back, think that I moved, maybe. I'm eighty-two already, and what is Paradise without such potatoes? ## How the Hen Sold Her Eggs to the Stingy Priest An egg is a grand thing for a journey. It will make you a small meal on the road and a shape most serviceable to the hand for darning socks, and for barter a purse of gold opens doors anywhere. If I wished for a world better than this one I would keep, in an egg till it was wanted, the gold earth floating on a clear sea. If I wished for an angel, that would be my way, the wings in gold waiting to wake, the feet in gold waiting to walk, and the heart that no one believed in beating and beating the gold alive. ## A Wreath to the Fish Who is this fish, still wearing its wealth, flat on my drainboard, dead asleep, its suit of mail proof only against the stream? What is it to live in a stream, to dwell forever in a tunnel of cold, never to leave your shining birthsuit, never to spend your inheritance of thin coins? And who is the stream, who lolls all day in an unmade bed, living on nothing but weather, singing, a little mad in the head, opening her apron to shells, carcasses, crabs, eyeglasses, the lines of fishermen begging for news from the interior—oh, who are these lines that link a big sky to a small stream that go down for great things: the cold muscle of the trout, the shining scrawl of the eel in a difficult passage, hooked—but who is this hook, this cunning and faithful fanatic who will not let go but holds the false bait and the true worm alike and tears the fish, yet gives it up to the basket in which it will ride to the kitchen of someone important, perhaps the Pope who rejoices that his cook has found such a fish and blesses it and eats it and rises, saying, "Children, what is it to live in the stream, day after day, and come at last to the table, transfigured with spices and herbs, a little martyr, a little miracle; children, children, who is this fish?" ## A Humane Society If they don't take animals, I cannot possibly stay at the Statler no matter how broad the beds nor how excellent the view. Not even if the faucets run hot and cold pearls, not even if the sheets are cloth of gold, because I never go anywhere without my raccoon, my blue raccoon in his nifty mask, the shadow cast by mind over sight. I never go abroad without consulting his paw or reading the weather in the whites of his eyes. I would share my last crust with his wise mouth. And even if the manager promised provisions could be made for a blue raccoon, I cannot possibly stay at the Waldorf, no matter how many angels feather the fondues, no matter how many bishops have blessed the soup, because I never go anywhere without my cat, my fuchsia cat in her choirboy bow, in the purity of whose sleep a nun would feel shamed, in whose dreams the mouse lies down with the elephant. I never go to bed without setting her at the door for her sleep robs even the serpent of poison and no door closes where she takes her rest, but even if the manager said, very well, we can accommodate, for a fee, a fuchsia cat, I cannot possibly stay at the Ritz. I understand bears are not welcome there. I understand that everyone walks on two legs, and I never go anywhere without my bear who is comelier of gait than any woman, who wears no shoes and uses no speech but many a day has laid down his life for me in this city of purses, assassins, and the poor. He would give me his coat and walk abroad in his bones, and he loves a sunny window and a kind face. I need a simple room papered with voices and sorrows without circumstance, and an old lady in the kitchen below who has welcomed visitors more desperate than ourselves and who fondly recalls a pregnant woman riding a donkey and three crazy men whose only map was a star. ## Marriage Amulet You are polishing me like old wood. At night we curl together like two rings on a dark hand. After many nights, the rough edges wear down. If this is aging, it is warm as fleece. I will gleam like ancient wood. I will wax smooth, my crags and cowlicks well-rubbed to show my grain. Some sage will keep us in his hand for peace. ## For You, Who Didn't Know At four A.M. I dreamed myself on that beach where we'll take you after you're born. I woke in a wave of blood. Lying in the back seat of a nervous Chevy I counted the traffic lights, lonely as planets. Starlings stirred in the robes of Justice over the Town Hall. Miscarriage of justice, they sang, while you, my small client, went curling away like smoke under my ribs. Kick me! I pleaded. Give me a sign that you're still there! Train tracks shook our flesh from our bones. Behind the hospital rose a tree of heaven. _You can learn something from everything,_ a rabbi told his Hasidim who did not believe it. I didn't believe it, either. O rabbi, what did you learn on the train to Belsen? _That because of one second one can miss everything._ There are rooms on this earth for emergencies. A sleepy attendant steals my clothes and my name, and leaves me among the sinks on an altar of fear. "Your name. Your name. Sign these papers, authorizing us in our wisdom to save the child. Sign here for circumcision. Your faith, your faith." O rabbi, what can we learn from the telegraph? asked the Hasidim, who did not understand. And he answered, _That every word is counted and charged._ "This is called a dobtone," smiles the doctor. He greases my belly, stretched like a drum, and plants a microphone there, like a flag. A thousand thumping rabbits! Savages clapping for joy! A heart dancing its name, I'm-here, I'm-here! The cries of fishes, of stars, the tunings of hair! O rabbi, what can we learn from a telephone? _My shiksa daughter, your faith, your faith_ _that what we say here is heard there._ ## In Praise of ABC In the beginning were the letters, wooden, awkward, and everywhere. Before the Word was the slow scrabble of fire and water. God bless my son and his wooden letters who has gone to bed with A in his right hand and Z in his left, who has walked all day with C in his shoe and said nothing, who has eaten of his napkin the word Birthday, and who has filled my house with the broken speech of wizards. To him the grass makes its gentle sign. For him the worm letters her gospel truth. To him the pretzel says, I am the occult descendant of the first blessed bread and the lost cuneiform of a grain of wheat. Kneading bread, I found in my kitchen half an O. Now I wait for someone to come from far off holding the other half, saying, _What is broken shall be made whole._ _Match half for half; now do you know me again?_ Thanks be to God for my house seeded with dark sayings and my rooms rumpled and badly lit but richly lettered with the secret raisins of truth. ## Walking Poem How beautifully the child I carry on my back teaches me to become a horse. How quickly I learn to stay between shafts, blinders, and whips, bearing the plough and the wagon loaded with hay, or to break out of trot and run till we're flying through cold streams. He who kicks my commands know I am ten times his size and that I am servant to small hands. It is in mowed fields I move best, watching the barn grow toward me, the child quiet, his sleep piled like hay on my back as we slip over the dark hill and I carry the sun away. ## Angels in Winter Mercy is whiter than laundry, great baskets of it, piled like snowmen. In the cellar I fold and sort and watch through a squint in the dirty window the plain bright snow. Unlike the earth, snow is neuter. Unlike the moon, it stays. It falls, not from grace, but a silence which nourishes crystals. My son catches them on his tongue. Whatever I try to hold perishes. My son and I lie down in white pastures of snow and flap like the last survivors of a species that couldn't adapt to the air. Jumping free, we look back at angels, blurred fossils of majesty and justice from the time when a ladder of angels joined the house of the snow to the houses of those whom it covered with a dangerous blanket or a healing sleep. As I lift my body from the angel's, I remember the mad preacher of Indiana who chose for the site of his kingdom the footprint of an angel and named the place New Harmony. Nothing of it survives. The angels do not look back to see how their passing changes the earth, the way I do, watching the snow, and the waffles our boots print on its unleavened face, and the nervous alphabet of the pheasant's feet, and the five-petaled footprint of the cat, and the shape of snowshoes, white and expensive as tennis, and the deep ribbons tied and untied by sleds. I remember the millions who left the earth; it holds no trace of them, as it holds of us, tracking through snow, so tame and defenseless even the air could kill us. ## Carpenter of the Sun My child goes forth to fix the sun, a hammer in his hand and a pocketful of nails. Nobody else has noticed the crack. Twilight breaks on the kitchen floor. His hands clip and hammer the air. He pulls something out, something small, like a bad tooth, and he puts something back, and the kitchen is full of peace. All this is done very quietly, without payment or promises. ## One for the Road On the old bicycle the plumber brought me Saint Christopher gleams by the traffic bell. "Good as new." He tapped a rusty fender. "The girl who rode it moved to Florida. She was some kind of teacher, too," he grinned. No baskets, saddlebags, license, or lights. Eight novels crammed into my backpack— excessive as a life vest stuffed with stones— I pedal two miles to the travel agent to pay for my son's airline ticket home. Twenty years ago I jogged to market bearing the light burden of him, bobbing against my back. Singing to rooks and jays, he dipped his head under the sky's wing. He was lighter than my dictionary. On the threshold, when I set him down, my muscles quivered, light flooded my bones. I was a still lake holding up the sky. Now in his empty room, I hang the map that flopped out of the _National Geographic._ Start with what you know, I tell my students. Detroit, New York, Ann Arbor, Battle Creek— the roads that spider off from towns I know are red as arteries that serve the heart and bring fresh news to all its distant cities, Madison, Minneapolis–St. Paul. At his first solo flight away from home wearing the new jeans he'd bought for school, his father gave him a gold medal. "Given for good conduct all the years we had you, and for good luck." A talisman, a blessing, friendly as butter: Christopher, untarnished, bearing the magic child across the stream. ## Little Elegy with Books and Beasts #### _in memory of Martin Provensen (1916–1987)_ ### I Winters when the gosling froze to its nest he'd warm it and carry it into the house praising its finely engraved wings and ridiculous beak— or sit all night by the roan mare, wrapping her bruised leg, rinsing the cloths while his wife read aloud from _Don Quixote,_ and darkness hung on the cold steam of her breath— or spend five days laying a ladder for the hen to walk dryshod into the barn. Now the black cat broods on the porch. Now the spotted hound meeting visitors, greets none. Nestler, nurse, mender of wounded things, he said he didn't believe in the body. He lost the gander—elder of all their beasts (not as wise as the cat but more beloved)— the night of the first frost, the wild geese calling—last seen waddling south on the highway, beating his clipped wings. ### II He stepped outside through the usual door and saw for the last time his bare maples scrawling their cold script on the low hills and the sycamore mottled as old stone and the willows slurred into gold by the spring light, and he noticed the boy clearing the dead brush— old boughs that broke free under the cover of snow, and he raised his hand, and a door in the air opened, and what was left of him stumbled and fell and lay at rest on the earth like a clay lamp still warm whose flame was not nipped or blown but lifted out by the one who lit it and carried alive over the meadow— that light by which we read, while he was here, the chapter called Joy in the Book of Creation. ## The Poet Invites the Moon for Supper Tonight a stranger followed me home. He wore an overcoat and feathers. His head was as light as summer. When I saw how much light he spilled on the street, I knew he was rich. He wanted to make me his heir. I said, no thank you, I have a father. He wanted to give me the snow to wife. I said, no thank you, I have a sweetheart. He wanted to make me immortal. And I said, no thank you, but when you see somebody putting me into the mouth of the earth, don't fret. I am a song. Someone is writing me down. I am disappearing into the ear of a rose. ## The Poet Takes a Photograph of His Heart The doctor told him, Something is living in your heart. The poet borrowed a camera. He told his heart to smile. He slipped the plate under his ribs and caught his heart running out of the picture. He told his heart to relax. It beat on the plate with its fist. It did not want to lose its face! He told his heart he was taking nothing but an ikon by which to remember it. Then the heart stood up like a bandstand and the wren who lived under the eaves left her nest and started the long journey south. ## The Poet Turns His Enemy into a Pair of Wings His enemy was a dragon laced with medals. It picked his pockets, hid his poems, beat its tail on his head at night, blew the nose off his wife's face. For God's sake, peace! cried the poet. Then the dragon jumped on his back. Warm in his lizardskin coat he stepped outside. No one, no one else in the snowy city wore a lizardskin coat! Its purple hearts jingled like temple bells. It rested its pointed chin on the poet's head. Go right, said the dragon. The poet skipped left. Go up, said the dragon. The poet went downtown. At one o'clock it turned yellow. At two o'clock it turned green. Go up, said the dragon, or let me be. I am Salamander, fireman of the stars, bound to cross my brow with their ashes. How shall I go? asked the poet. Just as you are, said the dragon, day in night, night in hand, hand in pocket, pocket in poem, poem in bone, bone in flesh, flesh in flight. ## The Poet's Wife Watches Him Enter the Eye of the Snow She knew he was writing a poem because everything in the room was slowly sifting away: her dustpan the color of buttercups, her eyeglasses and her sink and her five masks praising the sun. That night she saw him ascend. He floated above their bed, he gathered the dark strands of the poem like a tide. On his nose her glasses polished themselves to crystals. On his back the dustpan fanned out like a saffron cape. Now he was turning his face toward the sun and riding her simple sink into heaven. In the morning she calls to the newsboy: "How can I, wife of the poet, know what he saw and did there? It is enough that I open my eyes and my glasses perch on my nose and show me the brittle dreams of parrots. Enough that my dustpan believes it shoulders the broken bones of those warriors the stars, that my sink gurgles for joy, and my five masks tell me more than I knew when I made them." ## The Ballad of Biddy Early "I've an empty stomach, you've an empty purse. You feel your fingers freezing? Outside it's ten times worse, so listen to my story. Forget the wind and rain. It's time for bed," the tinker said, "but pass the cup again. "I sing of Biddy Early, the wise woman of Clare. Many's the man admires her carrot-colored hair, and many those that come to her on horseback or by cart, for she can heal a broken leg or a broken heart. "She keeps a magic bottle in whose majestic eye a tiny coffin twinkles and if it sinks, you die. It rises, you grow better and slip out of your pain. It's time for bed," the tinker said, "but pass the cup again. "She covers the great bottle and runs to fetch the small, filled with a bright elixir, honey and sage and gall. She'll take no gold or silver but maybe a speckled hen. It's time for bed," the tinker said. "Let's pass the cup again. " _Follow the stream_ , she told me. _Go where the salmon goes._ _Avoid mischievous bridges_ _for even water knows_ _if you should drop this bottle_ —" He turned and spoke no more. Biddy Early's shadow was listening at the door. ## How the Magic Bottle Gave Biddy Its Blessing "Sighing stones, ghosts and bones, and who will dig a grave for roaring Tom, that bloody man who with a pistol gave death to seven people? The gravediggers have fled. So let the lightning bury him," the deathwatch bettle said. "Even the wicked need a grave and it's a dreadful thing for any man to make his bed under the vulture's wing. Give me the spade and pickax. A murderer who's dead can do no harm to anyone," Biddy Early said. She sank her spade into the sod— the stones began to weep. "The little mice," said Biddy, "are singing in their sleep." She sank her spade into the roots— their cry turned her to ice. The deathwatch beetle snickered, "An owl has caught the mice." Six feet down in darkness she heard the shovel chime against an old blue bottle glittering under grime. With sleeve and spit she polished it and heard the bottle call, "Of all things born at midnight I am most magical. "Nothing known shall come to pass, no secret word or wish, that I have not reflected. Bird, beast, or fish, every living thing shall praise the healing in your hand, Biddy, the bravest woman in all of Ireland." ## Charm of the Gold Road, the Silver Road, and the Hidden Road On my thumb I spun two roads from one thread, half silver, half gold. I made them and laid them over the land and said, "May those who follow you find gold but not glowworms, coins but not crickets, treasure but not tree toads, silver but not silence, money but not moonlight, not magic, and not me." ## How the Queen of the Gypsies Met Trouble-and-Pain My name is Maureen, I'm the tinker-town queen. My caravan travels from Gort to Kildare. When my pony went lame, I remembered the fame of Biddy the healer, wise woman of Clare. Bright star of the morning, she gave me fair warning: "Under my bridge huddles Trouble-and-Pain. For the sake of this bottle, the creature will throttle both you and your horse as you cross its domain." I gave her a ring, hammered out like a wing, I gave her green ribbons to tie up her hair, a velveteen fan, and a new frying pan and left with her blessing for Limerick Fair. When we came to the bridge, my horse wouldn't budge. The bottle grew frightened, it trembled and sighed, and the harder I held it, the stronger I felt it: a ghostly hand grappled, a ghostly mouth cried, "May your horse never walk, may your son never talk. May the saber-toothed gnats make a nest in your hair. May your logs never burn, may your dog never learn, and your purse turn to feathers at Limerick Fair. May your buttermilk bark, may your lanterns go dark, and your skillets and petticoats take to the air. May you drown in the lake, unless I can take that bottle of Biddy's, wise woman of Clare." When it reared up its head, I took courage and said, "By my mother's gold tooth and my father's glass eye—" Then down the bridge clattered, the bottle was shattered, but Trouble-and-Pain was more frightened than I. Some say life is brief as the fall of a leaf, and nothing lives long that lives under the sun, but friends and relations in five gypsy nations shall whisper my story till stories are done. ## How Biddy Hid Mick the Moonlighter's Sleep in Her Sleeve Mick came to her house at midnight and pounded on Biddy's door. "I have murdered William O'Sheehy for sucking the blood from the poor. "He put me out of my cottage, he burned my house to the ground. I have murdered William O'Sheehy and will hang for it, if I am found." Biddy spoke to her magic bottle, she held it against her ear and heard O'Sheehy's men riding and whispered, "Go far from here. "Take the little road to Liscanoor. Speak to nobody on the way. Take the broken dinghy to Kilrush and a ship to Amerikay." Mick wrote a name in the ashes while the moon looked in at the door. "Before I go, Biddy darling, will you help me one time more? "Will you tell the murdered man's sister I'm wanted dead or alive, and if she'll follow a wanted man I'll send for her when I arrive?" Biddy spoke to her magic bottle, and the woods and the roads fell asleep, the tinkers and turnips and mill wheels, the soldiers and salmon and sheep. Mick the Moonlighter's weariness left him. It circled O'Sheehy's land and darted through Biddy's window and settled on Biddy's hand. She folded its wings with a promise, she stroked its breast with a sigh, she made it a nest in her right sleeve and closed its wicked green eye. Not a soul stirred or wakened from Feakle to Usher's Well. O'Sheehy's men came in the morning, saying, "Tell, tell." "The bird has flown," said Biddy, "where the moon and the stars run free. The man you seek is fast asleep, safe on the Irish Sea." ## Biddy Early Makes a Long Story Short I, biddy early, come from the Red Hills. My mother traveled under the cold sky and carried me, her firstborn, on her back. May the roads she walked stay with me till I die. I am at home with hunger. For my bread I learned to haul stones, scrub floors, and cook. When Mother died, a wren taught me to read the spells in streams and stones. Earth was my book. The priest tells me, "Biddy, come to Mass." I say, "Father, when I kneel down alone the people whisper things. I want to live out of their sight, with crickets and cats and stones, "and when I die, I shall give back to Earth all her gifts for the healing of hurts and ills. I shall come back in water and words and leaves, I, Biddy Early, asleep in the Red Hills." ## Song from the Far Side of Sleep Lullaby, my little cat, Lord of Mouse and Knave of Bat. Hail, Mischief, full of grace, who did lately love this place. Lullaby your crescent claws in the chambers of your paws, which you sharpen day and night, keeping all my kettles bright. Lullaby your gentle purr. What small spirits did you lure to the mushroom rings I made and the lesser spells we laid? Lullaby your pebbled tongue. Keep my velvets ever young. Keep my slippers ever slick with the patience of a lick. Lullaby your lively tail. Never have I seen it fail, spirits gone and revels done, to point the quickest highway home. Eternal life, eternal death hang on our Creator's breath. Little tiger in God's eye, remember Biddy's lullaby. ## William Blake's Inn for Innocent and Experienced Travelers This inn belongs to William Blake and many are the beasts he's tamed and many are the stars he's named and many those who stop and take their joyful rest with William Blake. Two mighty dragons brew and bake and many are the loaves they've burned and many are the spits they've turned and many those who stop and break their joyful bread with William Blake. Two patient angels wash and shake his featherbeds, and far away snow falls like feathers. That's the day good children run outside and make snowmen to honor William Blake. ## Blake Leads a Walk on the Milky Way He gave silver shoes to the rabbit and golden gloves to the cat and emerald boots to the tiger and me and boots of iron to the rat. He inquired, "Is everyone ready? The night is uncommonly cold. We'll start on our journey as children, but I fear we will finish it old." He hurried us to the horizon where morning and evening meet. The slippery stars went skipping under our hapless feet. "I'm terribly cold," said the rabbit. "My paws are becoming quite blue, and what will become of my right thumb while you admire the view?" "The stars," said the cat, "are abundant and falling on every side. Let them carry us back to our comforts. Let us take the stars for a ride." "I shall garland my room," said the tiger, "with a few of these emerald lights." "I shall give up sleeping forever," I said. "I shall never part day from night." The rat was sullen. He grumbled he ought to have stayed in his bed. "What's gathered by fools in heaven will never endure," he said. Blake gave silver stars to the rabbit and golden stars to the cat and emerald stars to the tiger and me but a handful of dirt to the rat. ## The King of Cats Sends a Postcard to His Wife Keep your whiskers crisp and clean. Do not let the mice grow lean. Do not let yourself grow fat like a common kitchen cat. Have you set the kittens free? Do they sometimes ask for me? Is our catnip growing tall? Did you patch the garden wall? Clouds are gentle walls that hide gardens on the other side. Tell the tabby cats I take all my meals with William Blake, lunch at noon and tea at four, served in splendor on the shore at the tinkling of a bell. Tell them I am sleeping well. Tell them I have come so far, brought by Blake's celestial car, buffeted by wind and rain, I may not get home again. Take this message to my friends. Say the King of Catnip sends to the cat who winds his clocks a thousand sunsets in a box, to the cat who brings the ice the shadows of a dozen mice (serve them with assorted dips and eat them like potato chips), and to the cat who guards his door a net for catching stars, and more (if with patience he abide): catnip from the other side. ## The Tiger Asks Blake for a Bedtime Story William, William, writing late by the chill and sooty grate, what immortal story can make your tiger roar again? When I was sent to fetch your meat I confess that I did eat half the roast and all the bread. He will never know, I said. When I was sent to fetch your drink, I confess that I did think you would never miss the three lumps of sugar by your tea. Soon I saw my health decline and I knew the fault was mine. Only William Blake can tell tales to make a tiger well. Now I lay me down to sleep with bear and rabbit, bird and sheep. If I should dream before I wake, may I dream of William Blake. ## Epilogue My adventures now are ended. I and all whom I befriended from this holy hill must go home to lives we left below. Farewell cow and farewell cat, rabbit, tiger, sullen rat. To our children we shall say how we walked the Milky Way. You whose journeys now begin, if you reach a lovely inn, if a rabbit makes your bed, if two dragons bake your bread, rest a little for my sake, and give my love to William Blake. ### THREE FROM THE SPORTS PAGE ## "Buffalo Climbs Out of Cellar" "Will you have some sherry?" asked the million-dollar baby-faced killer. He filled my glass, and the whole room sucked me into its sharkish smile. "You're fond of hunting," I said. "Did you shoot all those guys on the wall?" He nodded and raised the cuff of his pants. His left leg was ivory to the knee. "That Bengal tiger was my first success. Then I matched wits with a white whale and won. After that I went in for elephants. And then I heard about the last buffalo in South Dakota. Very educated. He speaks fluent Apache. He writes by scratching his hooves in the dirt. He's writing a history of the Civil War, So naturally I took him alive. Day and night I keep him locked in my cellar. His breath heats this house all winter. His heart charges all my rooms with light. In my worst dreams I see them folding up like a paper hat, and my dead tiger roaring and my dead whale swimming off the wall and my buffalo climbing out of the cellar." ## "Saints Lose Back" And there was complacency in heaven for the space of half an hour, and God said, Let every saint lose his back. Let their wings and epaulettes shrivel, and for immortal flesh give them flesh of man, and for the wind of heaven a winter on earth. The saints roared like the devil. O my God, cried Peter, what have you done? And God said, Consider the back, the curse of backache the humpback's prayer. Consider how thin a shell man wears. The locust and crab are stronger than he. Consider the back, how a rod breaks it. Now consider the front, adorned with eyes, cheeks, lips, breasts, all the gorgeous weaponry of love. Then consider the back, good for nothing but to fetch and carry, crouch and bear and finally to lie down on the earth. O, my angels, my exalted ones, consider the back, consider how the other half lives. ## "Divine Child Rolls On" Lullaby, my sparrow. Cipher, make your mark in the Book of Being. Fly into the dark, passenger of the planet. Sun and stars are gone. The Divine Child find you, bless you, and roll on. # FICTION ## The Hucklebone of a Saint IN MY FATHER'S HOUSE, moral ambiguity was not allowed. It was considered unhealthy, like soft drinks and candy, not to be kept in the house and to be eaten only with reprimands that kept you from enjoying it. As a result of this stricture, until I was ten, my father and I saw little of each other. We had a nodding acquaintance at meals, during which he listened to the news on the radio and spoke to no one. When I heard his car crunching up the driveway at night, bringing him back from the laboratory where he worked both morning and evening, I knew I should be asleep. It was my mother who gave me my faith in the black arts, which came to dire fruition in my tenth year. Faith takes root in the insignificant. We would be sitting round the dinner table and I would drop my knife. "Pick it up, Erica," my father would say. Or perhaps he would say nothing, but I would feel a discomforting frown. "A man is coming," my mother would add. Or if I dropped a spoon: "A child is coming." I never thought to notice whether or not the prophecies came true. I only remembered that if you dropped a knife, a man would visit the house for certain. Not that day, perhaps, nor the next, but sometime when you did not expect it. When you had even forgotten you dropped the knife. My father did not recognize the power of a knife to bring a visitor, any more than he recognized the power of an umbrella opened indoors to bring bad luck. Knowing that differences exist most peacefully under one roof when they are unaware of each other, my mother did not practice her black arts openly before him. If she knocked over the saltcellar while clearing the table, she brushed a small pile of salt aside and waited till he was napping before she threw a pinch of it into the fire. She knew he would ask, just as I asked, and he would be harder to answer: "Why?" "Judas spilled salt at the Last Supper. And look what happened to him." I had seen da Vinci's _Last Supper_ hanging like an enormous postcard in the Sunday school parlor of the Lutheran Church, and I resolved to look for the salt. "See for yourself. It's lying on the table by Judas's hand, just like it's lying on our table now." "But just because Judas had bad luck, why should I have it?" "Just because." Not because one man, this particular man had had it, certainly. The more I thought about it, the more I knew I could not inherit Judas's bad luck the way you inherit the color of your eyes and the shape of your face. Rather, in spilling the salt he had somehow stumbled upon a law. Others had probably discovered it before him. But it took the Crucifixion and Potter's Field before its validity was recognized. It occurred to me that there must be many such laws I did not know. It had never worried me before. I knew it was my father's business to find out the laws which kept the world running. When he took me to the laboratory with him, I saw that it was full of things whose secrets he was wresting. "What are those pretty stones?" "Those are minerals." "Why do you keep them in that funny box?" "Because they're radioactive." It was his pleasure to open the laws that lay hidden in things and make them clear, so clear that I could touch them with my hands whenever I picked up the models of molecular structures he kept in a little glass case on his desk. What he found was beautiful and utterly irrelevant to the way I lived my life. The world would go on turning whether my father or anyone else's father found out why. To discover the law of gravity, for example, was only to name what you already knew. It didn't change a thing. The uselessness of my father's laws made them easier to learn than my mother's. He had marvelous instruments to extend the range of the senses and reach into the very cells of being. And when you found one law, you found others contingent on it. Whereas the laws in my mother's world were utterly capricious. You stepped on a crack and if your mother's back broke, you knew you'd found the reason. There were no conclusions, only an infinite number of particular cases. And knowing the laws that worked in particular cases did not free you from the fear of breaking them. It only committed you more deeply to a power that gave you nothing in return for your obedience, except the vague feeling that you were somehow maintaining the status quo. As soon as I acknowledged the existence of my mother's laws, life became immensely more complicated. Since each law was a particular event, the smallest events suggested themselves as a possible means of discovery. Riding my bicycle, for example, I would innocently imagine that if the stoplight turned red before I reached it, something bad would happen. If it didn't, things would stay the same. Nothing good would happen, but nothing bad would, either. Once I had decided it might be so, the game became real. The stoplight had the power to direct the traffic of my future. I began to avoid stoplights. Other events acquired a similar authority which had to be countered with rituals and taboos. Certain dresses brought bad luck and hung unworn in the closet. Tuesdays meant low marks on spelling quizzes and mistakes in mathematics. The most discouraging part of the whole business was that it was so much easier to bring bad luck on oneself than good luck. It was so much easier to break a mirror and live in the shadow of impending misfortune than to count a hundred white horses and wish for happiness. As the games I invented mysteriously turned into statutes, I believed that I was maintaining the even keel of our joys until one day I came home from school to find two suitcases in the front hall. Grandmother had left her husband and decided to live with us. She was to live out her life in our guest room, which quickly took on the color and smell of her life. It was a cold room, shut off from the house, with a pink satin bolster on the bed and doilies on the dressing table and a clean blotter on the desk; one of those anonymous rooms often slept in and rarely lived in, like a room in a hotel. Now the bolster gave way to a dozen eiderdowns. The radiators clanked and pounded; the room was kept at eighty degrees. My grandmother went about in heavy underclothes and sweaters and seldom left her quarters for more tepid parts of the house. Further, its innocent spaces were suddenly thronged with medicine bottles of all kinds: lecithin, calcium, supplementary organic pills, Kaopectate, and Hexylresorcinol. There were also cases of vitamins, each regulating some function of the body and therefore necessary—Grandmother believed—to its survival. In her suitcase, which I observed was never wholly unpacked, she kept a reserve supply of everything. On the wall over the bed hung a Chinese painting of a mountain. This she disliked, though she never asked us to take it down. "Mountains! What good are mountains? You can't farm land like that." Her chief amusement was going to church. She listened to the sermon with great attentiveness but could never remember a word of it afterward. She enjoyed the music and the feeling of being united with so many people for the good of their souls, which she had been taught was the only good. She passed her days with what I considered an unbearable monotony. In the morning my mother brought up her oatmeal and orange juice on a tray. Grandmother sat at the dressing table and ate in front of the mirror, while my mother combed her long white hair into two braids and pinned them crosswise on her head. Then my mother went down to the cellar to hang up the wash—for it was early April when my grandmother came, and too cold to hang clothes outside—always listening for the sound of the old woman's voice. "Daughter?" "I'm right here." Assured she was not alone, Grandmother would set about arranging the accoutrements of her life—that is, the contents of the suitcase. In addition to her impressive collection of medicines, she kept extra sets of heavy underwear and rolls of toilet paper which she sometimes unwound and wadded into her garters like an amulet to ward off attacks of nervous diarrhea. It seemed to me that she was pursuing a secret journey, the destination of which constantly evaded her. Sometimes she would come to lunch wearing her hat and her big sealskin coat, inquiring about bus schedules, hinting that she had not been well treated. My mother's response was always the same. "There are no buses today. It's a holiday." "Ah, then, I'll have to wait." Then she would mention her responsibilities at the house in Corona which she had so recently left and where my mother had grown up. Men were coming to pick the cherries in the orchard; she had to look sharp that they did not cheat on the hours. Grandfather was waiting for her; who would fix his dinner? She would explain it to us with pathetic urgency. My mother maintained the illusion through a round of outings which never got the woman to her destination but only postponed the total collapse of her reason. Grandmother's favorite escort on these outings was her brother Oskar. He was seventy-one, seven years younger than my grandmother. To me he was ageless, a spry, dapper little man who always wore two-toned Oxfords and a black and yellow vest, giving him the look of a frail and friendly bee. He was retired, not from any single occupation but from a great variety of them, including brief stints as homesteader, circus barker, undertaker's assistant, and shortstop for an obscure ball team in Minnesota. He had once had a wife and child, both of whom were dead, and I remember neither. Sometimes he wrote poems—jingles, he called them—on the placemats he got every noon at Howard Johnson's, surfaces as suggestive to him as marble to Michelangelo, their floral borders and bright colors concealing clusters of language. Slipping a finely folded jingle into my hand, he would greet me with a mock bow, his shoes twinkling. "Ah, Miss Callard," he would say. "Oh, Bowser, how I've missed you." That was in honor of the candies he kept in his pockets, Callard and Bowser's Plain Jane Toffees, or Lady Fingers, or Licorice. If he had no candy, then I knew he was bringing a game, a card trick, perhaps, or a Cracker-Jack toy. My mother justified his passion for Cracker Jacks by saying they reminded him of baseball, but I could see well enough how he broke into smiles of satisfaction when the toy appeared at the bottom of the box. Of all his presents he said, with a mixture of shame and pride, "It's nothing; I got it for pennies." He would drive Grandmother around town to parade, as he called it, in my father's car. Sometimes I went along, sitting alone in the backseat. "You want to take the wheel, my girl?" he suggested, turning solemnly to his sister. Grandmother looked at him with horror. "You used to do very well. I remember how we had the only car in Deep River, and how you used to make me get out at every corner and look in all directions to see if another one was coming." Her early scruples eventually overcame her, for when my mother was fourteen, Grandmother drove the car into the garage and forgot to take it out again. No one else in the family had a license, so there it remained while my grandmother thought of more and more reasons for walking to this place and that, until it was understood that the car was now part of the house, as immovable as the walls and the floor. On Sundays, my great-uncle came for breakfast, bringing with him a small flute of his own carving. He never went with us to church but waited at the house to join us for dinner, after which he retired to the sun room for a nap. He slept with his eyes open for about an hour and then I would hear him talking to the flute, as if he had no idea of gaining my audience. "There was an organ in the house where we grew up. All the German farmhouses had them. Your grandmother used to sit in the parlor and play it by the hour." "Where is it now?" I had always wanted to play an organ but thought that all organs were indissolubly joined to churches. Oskar shook his head. "The spitzwinks took it." It was the German farmers in Iowa who told Oskar about the spitzwinks. Sometimes the crops failed because of rain, sometimes because of drought. And sometimes they failed for no reason at all. Then the farmers said, "Ah, the spitzwinks have done it." The spitzwinks made holes in your best stockings and chipped the cups and saucers that you used every day. They were the reason that plants marked "annuals" on the box at the market would not return in the spring. "But why didn't Great-Grandpa lock up the organ so the spitzwinks wouldn't steal it? Didn't he know there'd be other children?" "He never thought of it." The spitzwinks, I thought, were a sort of game, with no more substance than a figure of speech. But as weeks turned into months and Grandmother stayed on, I soon saw them as a name for forces which enmeshed her in propitiatory rituals far more suffocating than my own. When she was dressed for bed and had drunk the hot milk that my mother brought her, she closed her door and began the long process of barricading it. Lying in my bed I could hear the moving of furniture, the heaviest pieces in the house and a chilling testimony of my grandmother's strength. A long slow scraping across the floor was the chest of drawers. Then came the slow bump of the dressing table with the oval mirror. That did not move so easily because the castors had disappeared. And finally I heard a persistent scuffling sound, as if my grandmother were waging a battle with the forces of darkness. In half an hour the sounds ceased but the light still shone under her door; she was awake. "Margaret, did you lock the front door?" That was my mother, who always sounded like somebody else when anyone called her by her first name. "Yes!" My father was already asleep; he left to my mother the responsibility of answering. For a few minutes it would be still. Then I heard the furniture moving again, the chest of drawers, the dressing table, the chair. This time, it was being forced away from the door. When the door opened, Grandmother's voice sounded near. She had stepped into the hall. "I say, did you lock the front door?" "Yes, of course!" "I think I'll just go down and try it." Like the soul of an extinct bird she glided swiftly down the stairs, her two braids springing out over her ears just as they fell when she took out the pins. She rattled the knob of the front door for us all to hear. "Good. I just wanted to be sure." Then her own door would slam, as if she had reached her room in a single bound. And presently the moving of furniture would begin again. Night after night I acknowledged the danger that lay in such defenses. Clearly my grandmother's rituals only brought her closer to the fears she wished to avoid. Mine were still part of the games that a child plays, when by an act of the imagination he wills his own life into what has none, for the sake of companionship. If my grandmother's rituals were a game, then it must be a game that she played in deadly earnest, the stakes to be paid with her own life. Whenever I recognized this, I had the uncomfortable feeling that we were becoming more and more alike. What linked us was a discovery that the faith we had gathered from generations of Sundays was no match for this greater faith in the reality of darkness. Where did it come from? We had not invited it. Who put it into my heart that the darkness under the bed gathered itself into invisible hands, waiting to snatch my feet when I groped my way back from the bathroom at night? How was it that my mother, my father, and Uncle Oskar stepped quietly into their beds with no knowledge of this danger and therefore no fear? How could you lose your freedom without knowing who had taken it? If my faith in the darkness could not be broken, then it was not faith as I knew it but a love for all that could not be named and a secret desire that it never should be. Because of this love my mother wore her best dress wrong side out to my cousin's wedding for fear of bringing bad luck on the heads of the newly wedded pair. Because of this love she knocked on wood whenever she spoke of my achievements in school and asserted half-jokingly—but only half—that Thomas Dewey had lost the presidential election because he had a horseshoe hanging upside down over his door and all his luck drained out. She had grown up in a neighboring town and seen for herself the quiet gnawing emblem of his doom which, if heeded, might have changed the course of nations. By day, Grandmother's diversions alternated between drives, church, and Abby's beauty parlor. The beauty parlor and the church stood kitty corner from each other, on a block named by persecuted German immigrants who wanted their children to grow up on Liberty Street. The slow but ceaseless arrival of new settlers gave it such a vivid restlessness that even now I think of it not as a place but as a way of being alive. The excitement began early in the morning when men in white overalls streaked with blood hauled carcasses from trucks to the back of the butcher shop. But when its doors opened for business, the very memory of blood had been quenched. Sausages were hung high on the ceiling, tucked out of sight like poor relations, to be asked for by name but not displayed. On shelves that ran the length of the shop you found cocoa from Holland in delftware jars, flatbread from Norway, and flowered tins of gumdrops from Paris. Abby had her beauty shop above the butcher's, and it was there that I met Mary Ellen. She was two years older than I and had the job of answering the telephone and unwrapping the little pieces of cotton which Abby tucked into the hairnets of her customers to protect their ears from the sirocco blasts of the dryer. She also kept the glass atomizers filled with the heavy scented lacquer which "set" the finger-waves so that hair came out dry and rippling as dunes of sand. In exchange for these favors, Abby allowed her to read the movie magazines she kept by the dryers. Mary Ellen devoured the legends of her favorites as faithfully as she attended Mass. The stars were her secular saints, their changeless identities to be consulted in the minute crises of daily life. She borrowed a gesture from one, a hairstyle from another; all, I thought, to no effect. There was a faint aura of dirt about everything she wore, like a shading sketched on the original color, and as she washed the pins and curlers, customers would stare at her fingernails in amazement. For she did not believe in cleaning them; she simply bit the dirty portion away, peeling it with great fastidiousness like a delicate fruit. In warm weather we walked to a vacant lot behind a funeral parlor, where we could play undisturbed. The only other building on it was a warehouse full of coffins. Squeezing among them like bankers checking their safes, we would collect the number of different kinds, the way you collect out-of-state license plates or the number of white horses you pass when you are traveling. Most of the coffins were dark and plain. We decided it was lucky to find a baby's coffin, because we found them so seldom. A few of the large ones were scrolled, and we watched for these, too, though their luck was considered less potent. At the end of the day we remembered how many we had found. Or rather _I_ remembered how many we had found. I had come to believe that the luck things carried augmented like interest only if I kept my books straight, never forgetting how much I had saved. When the total number of white horses, license plates, loads of hay, baby coffins, and other spectacles deemed lucky by us grew too large to keep in my head, I wrote the sums down in a little notebook, with the conviction that it was both useless and necessary to some final reckoning of my fate. By this time the last platoon of Abby's customers would be touching their brittle curls as they emerged from under the dryers. Grandmother never sat under the dryer, as it threw her into a panic and she would roll her eyes about like a horse being pushed into a van. With her hair pinned in wet braids across her head, she turned the pages of the movie magazines, clucking at the wages of sin until my mother emerged with her hair pitilessly knotted into ringlets. "It's so hard to find someone who can do my hair plain the way I like it," she would say. Abby's hairdos were utterly without style. She believed in durability rather than immediate effect. She made pincurls so tight that they kept their kink for days and only ceased to remind you of sheep's wool or unshorn poodles a week later. On her walls hung photographs showing a wide variety of styles, but no matter which one you ordered you always came out looking the same. This attracted a host of elderly ladies whose conservative taste could not be met in the salons uptown, where ratting and backcombing were the fashion. Although I knew Abby had been a widow oftener than some wives have been mothers, I could not imagine her in love. She was a stocky figure, in her white smock, with sparse brown hair and thick glasses, and as she tipped your head into the sink and scrubbed your scalp, she sang at the top of her voice: "When you're smiling, When you're smiling, The whole world smiles with you." And while she sang, always a little breathless from reaching and scrubbing, she talked and talked and her bosom heaved like a full sail over your face. Neither I nor my mother knew any of the people she talked about, except as we might feel we knew the characters in a radio serial—Pearl, Maria, Charley, and all the others whose foibles she expounded to us according to her mood. "He's gone to see that widow lady downstairs, that's what. He lies around on her bed all day and she feeds him white albacore tuna. It's nothing but grub what he's after, a heartless beast, no feelings at all." Not for a long time did I learn that many of the names I associated with people actually belonged to cats. Abby fed all the stray cats that came to her door and demanded in exchange a scrupulous fidelity. If one stayed away for two days, or a week, she railed against him like a forsaken lover. With Grandmother, however, she never spoke of cats. Every conversation was an exchange of ailments and remedies, Grandmother defending her drugstore prescriptions and Abby speaking for her teas. Among her rinses she kept a packet of Alba chamomile, the label of which showed a man coming out of a forest and handing a spray of blossoms to a little girl. To me, that alone argued for its magical properties. "Someday you'll be drinking a good dose of henna if you're not careful, keeping it all mixed up like that," warned my mother. But Abby's cupboard contained a greater wonder than Alba chamomile tea. It was locked away in a small chest behind the bleaches and dyes. Sometimes, when all her customers were safely tucked under the dryers and time lay heavy on her hands, she would bring it out for Mary Ellen and me to look at. "It's the hucklebone of a saint," explained Abby. I did not dare to ask what a hucklebone was and decided that it was the place on your elbow that tingled when you accidentally bumped it against a table or chair. I have since learned that it is the anklebone. The tiny splinter of bone lay pressed between two discs of glass in the middle of a brass sun from which crude rays emanated. Abby's grandfather, a connoisseur of the marvelous, had bought it in the catacombs outside Rome from a priest who took him through by the light of a serpent twisted around his staff. At Cologne he had kissed the skulls of the Magi and the nail driven into Christ's right foot; at Trèves he had touched part of the thigh of the Virgin Agatha and seen the devil carrying the soul of his grandmother in a wheelbarrow. He had walked on the holy stair of Saint John Lateran and wagered for a tooth of Saint Peter. He lost the wager, but the same day he was miraculously healed of a lifetime of headaches by combing his hair with the comb of a saint. "Which saint?" asked Mary Ellen. "I don't know. What does it matter?" I liked the saints, faded as they were in the liturgies of my church. I liked them because they attended so patiently to the smallest human catastrophes. If you lost something you went to Saint Anthony. If you wanted a husband you went to Saint Nicholas. Even thieves found a comforter among the ranks of the blessed, who would not turn a deaf ear to their problems. I had need for such a comforter. Since my grandmother's arrival my dependence on the dark powers had grown steadily worse. I had come to believe that certain words released the forces of evil, being part of that vast body of laws of which spilling salt was only a tiny amendment. All my life, words had come to me wrapped in feelings that had nothing to do with their meanings and everything to do with the way my hand felt when I printed them. But now they lost all connection with the things they named and took on the opacity of a magic formula. Not being able to say _tree_ didn't mean that trees were evil. It only meant that saying the name released forces beyond your control. Perfect obedience led, clearly, to perfect silence, and the slow death of all my delights. You cannot serve two masters. Or rather, you can, but the moment will come when you must choose between them. We were crossing the lot on our way to the coffins when suddenly Mary Ellen stamped her foot and cried, "Lucky Strike!" "What?" "I stepped on a new one. See?" So I stepped on it also. "Lucky Strike." She shook her head. "You can say it if you want to, but it isn't as good as if you'd found your own. It counts less. And don't _ever_ step on a Pall Mall." I felt a whole new mesh of complications engulf me. "Let's not count cigarette packs. It's too hard." I wanted her to tell me that in the scheme of things, Lucky Strikes and Pall Malls did not matter. Instead, she only looked at me in astonishment. "Too _hard_?" "I can't remember so many things." I was beginning to feel irritable. "Why do we have to count things all the time? You keep track of license plates, you keep track of everything." "It's only a game," she said in puzzled tones. "Well, it isn't a game to me!" I bellowed. The door of the funeral parlor opened and a man stepped out and cleared his throat. We scuttled across the lot to the street and began walking quickly past the houses toward downtown. "A lot of people in there," whispered Mary Ellen, looking back over her shoulder. "You want to watch?" "I don't want to watch anything anymore! I'm tired of counting. All those things, I _have_ to count them. I don't know why but I have to count them. And I don't want to. My head is so crowded with junk already that sometimes I feel like it's going to explode." "Then why don't you quit?" "I don't know!" My voice had risen to a shout. An old woman sitting on her front porch stared at us. "It's like there was some other person inside of me making me do it. Every time I want to quit there's that other person who won't let me." Mary Ellen nodded. "Somebody has put a hex on you, maybe," she suggested. "Maybe," I agreed. "If it happened to _me,_ I'd just go straight to Father Hekkel and he would make it all right." The notion of involving a stranger alarmed me at once. Now that I'd dragged the thing into broad daylight it sounded foolish even to my own ears. "Since you aren't in our church, maybe Father Hekkel wouldn't work. We better try and find somebody else." "What about Abby?" We were lucky. The only customer was white-haired Miss Briggs who worked in a dry goods store and looked like somebody's memory of a piano teacher. Miss Briggs was hunched under the dryer reading a confession magazine with the front cover folded back, and Abby was sweeping up the hair clippings that lay around the chairs into a feathery pile. Mary Ellen walked in and came right to the point. "Erica has a devil in her." "Lord-a-mighty!" cried Abby, nearly dropping the broom. "What makes you think so?" And now I turned the light on my dark voices, and told her everything, all my rituals from beginning to end, spewing them out like a bitter and humiliating confession. White horses and spilled salt and words that went cold on my tongue. The number of steps to the bedroom door and the long leap in the dark. Abby listened gravely, glancing now and then at Miss Briggs, who sat insulated by the hot rushing air like a silent and skinny warrior. "Well," she said at last. "Well, well. A devil. Yes, indeed." She did not seem to understand what we wanted of her, so Mary Ellen explained. "We came to you because we thought you could call him out." "Ah," said Abby, as calmly as if we'd asked her the time of day. "Well, I don't know the words for it. Go get that little black book over by the telephone." Mary Ellen brought the book and Abby thumbed through it slowly. At last her finger paused on a page. "Here are the words for the exorcising of the devil." She peered over her glasses, first at Mary Ellen and then at me. "A matter not to be taken lightly." "No, of course not," I said, feeling myself in the presence of a great physician who would now perform a miraculous cure. "If you're absolutely certain it's the devil, we ought to have the priest do this." "I'd rather you did it, Abby." Abby looked very pleased. "Well then, you two stand behind that table." Suddenly inspired, she went to the cupboard and took out the reliquary. "There's nothing holier than the hucklebone of a saint." She set it in the middle of the dressing table so that the mirror caught it from behind. Then she pushed Mary Ellen and me together, joining our hands on the relic as for a marriage, and laying the book open before her, she began to read in a loud voice. > I exorcise, thee, most vile spirit, the very embodiment of our enemy, the entire specter, the whole legion, in the name of Jesus Christ, to get out and flee from this creature of God. He himself commands thee, who has ordered thee cast down from the heights of heaven to the depths of the earth. He commands thee, He who commands the sea, the winds, and the tempests. Hear, therefore and fear, O Satan, enemy of the faith, foe to the human race, producer of death, thief of life, destroyer of justice, root of evils, kindler of vices, procurer of sorrows. Why dost thou stand and resist, when thou knowest that Christ the Lord will destroy thy strength? Under my grasp, the hucklebone warmed. It had acquired for me a life of its own wholly different from its first life, just as it was Abby who read, and yet not Abby, but someone much older. Ancient, even. Not for Abby the beauty operator would the spirit of darkness depart, but Abby the magician's daughter, daughter of Eve, descendant of saint-seekers and wanderers of holy places. Her voice was rolling like thunder as she turned the page: > Now therefore depart. Depart, thou seducer. He expels thee, from whose eye nothing is secret. He expels thee to whose power all things are subject. He excludes thee, who has prepared for thee and thy angels everlasting hell; out of whose mouth the sharp sword will go, He who shall come to judge the quick and the dead and the world by fire. "Too hot! Too hot!" shouted a voice, and we all yelled, and I thought I saw the devil in the mirror and shouted to Abby, but then he shriveled into Miss Briggs making signs that she wanted to come out, forgetting, as the deaf do, that others can hear. There was a snapping of hairpins as Abby pushed the dryer back and Miss Briggs emerged, as dazed as if she had awakened from a long sleep. Her hair lay against her scalp in crusted waves like cake frosting. "What a funny color," observed Mary Ellen. "I believe your hair's darker than it was." Miss Briggs sat down at the mirror and Abby took off the net and shook the pins loose. Nobody said a word for several minutes. Then Miss Briggs spoke up. "It looks green," she whispered hoarsely. "Does it look green to you?" Abby bent low for closer inspection, but you could have answered her just as well from across the room. "It does have a sort of greenish cast. Sometimes a person can be allergic to the cream rinse." "I never was before," said Miss Briggs, her face working. Abby shook her head. "I don't think a light rinse will cover it. You wouldn't want anything stronger than a rinse, would you?" "Oh my, no. Just something to cover up the green." "I could make it darker. Black, for example." "Black!" "It's better than green." The silence prickled with voices. Why, Edith Briggs, what have you done to yourself? Would you believe it, running after the young men at _her_ age? Abby stuffed some change into my hand. "Run downstairs and get two teas and some honey rolls." Coming back, we met Miss Briggs talking to herself on the stairs with her hair hanging black around her face in big rollers, like spaniel ears. Abby was nowhere in sight. When I got home, a palpable emptiness had invaded the house. Out of the dining room, with a rustling like blown curtains, stepped Oskar. He had been sitting alone in the falling light. "They're all out looking for your grandmother," he said brokenly. "She's run away. Slipped out of the house while your ma was hanging up clothes." "She couldn't have got very far," I said. "She has no money." "No. But she's a strong woman." She was found about five blocks from the house, headed, she believed, for the bus station. It had started to rain and the drops glistened on her big sealskin coat and her white hair. Mother hurried her upstairs and I heard the commotion—bath water running and heaters being turned on—that always arose when I came home from school with wet feet. "She'll catch cold, you wait and see," said Oskar, sorrowfully. She could not go outside now but lay in her bed, swathed in sweaters, while the radiators pounded in her room and the lights burned all night long. On the fourth day after her flight she decided to get up. She seemed to have gathered strength from her illness instead of losing it. "I'll take her to market with me on Saturday," suggested my father. "Better to take her out than to have her run off again." Market days were minor feast-days in our family. We bought honey and vegetables to last us for the week and sometimes such curiosities as acorn pipes and peacock feathers. Oskar and I would hold mock duels with our feathers all week till they broke. It was unseasonably brisk for May. The egg-seller was warming her feet at a tiny stove and the honey-vendor had incarcerated himself in a little hut with a plastic window, behind which he waited as if for you to confess your sins. Grandmother walked among flats of pansies and beamed. For the first time that I could remember, she did not notice the cold. She did not get up for church on Sunday, but lay whispering quietly in bed, unaware even of the presence of the doctor, whose attentions would have been a welcome diversion in her hardier days. "For pneumonia at her age, there's not much hope. You should take her to the hospital all the same; the oxygen facilities there will prolong her life a little." "I want to have no regrets," said my mother. "It's so dreadful to have regrets afterward." My grandmother was put into a private room with nurses round the clock and a little cot near her bed for my mother, who told us how awful it would be to wake up at such a time and not know anybody. But on Tuesday she was dead. My mother came home from the hospital, her eyes ringed with blue. Neighbors brought in food, and casseroles—mostly chicken—began to accumulate in the kitchen. Suddenly plans for the funeral absorbed her with a thousand tedious details which ramified and consumed her grief. When Oskar stopped by our house that evening, she ran up to him, eager and awkward, like a little girl. "I don't know how I'm going to manage. Oskar, if you'd only stay. You could sleep on the sofa." "Wouldn't it be easier to put me in Grandmother's room? I'd be out of the way." My mother looked flustered. "Do you think you'd be _comfortable_ in there?" I knew from her voice that she thought nobody could ever be comfortable there now. "Well, well, we'll see," said Oskar. His valise in the middle of the floor announced his decision. Keeping a wary eye on the open door, my mother stripped the bed with a studied casualness. Never had I heard her move so quietly, as if she were afraid of awakening the air itself. Suddenly the door slammed and she let out a shriek of terror. Oskar rushed in. "Let me do it," he said. And I heard him plumping the pillows and humming tenderly to himself, straightening the bed, it seemed, for the woman who had recently left it. Darkness fell so gently that nobody remembered to turn the lights on. We did not sit down for supper, but picked at the casseroles spread out in the kitchen as for a church potluck. Oskar and my father, balancing paper plates on their knees, sat in the sun parlor, remembering death. First Oskar remembered that the only extant photograph of his grandfather showed him in his coffin because Aunt Betty argued that a picture of him dead was better than no picture at all, and if you had the eyeballs touched in you could imagine him sitting in a first-class railway carriage. Then my father remembered the funeral of a young girl he attended during a diphtheria epidemic, in which the mourners stood across the street and the coffin was tipped forward at the window by the girl's mother at a signal from the minister, who shouted his sermon from the front porch within hearing of both parties. And then, in low voices, like children after the lights have been put down, they mused on the motions of the body after death. How hair and nails continue to grow and how the dead sit up in the furnace and their bones crack. "You won't catch me being cremated," said Oskar. "When I'm down, I want to stay down." At ten o'clock my father started the movement to bed. Last one up will be the first one dead— I bit my tongue, remembering my newly won freedom, waited till the others had gone on ahead and then ascended the stairs. In my room I undressed quickly and started to jump into bed— _There is no one under the bed who will grab your feet._ I walked to the edge of the bed with slow and measured stride. Let the hands come if they dare. The body snatchers. And then my mother's voice called out, "Oskar, are you sure you won't be afraid in there?" "Afraid?" His voice was filled with mild amazement. "Why should I be afraid? I loved the woman!" His door closed, but I heard him moving around, and a light under the crack spilled faintly into the hall. Presently he opened the door. The radiators were pounding. Mother had turned up the heat for Grandmother. I got out of bed and stood in the doorway of my room and saw him, isolated in a little shell of light, as if I were looking at him through a mailing tube. He was sitting at the dressing table where Grandmother ate her breakfast, and he was writing calmly and steadily. I decided for no reason that he was writing a poem. On the back of a placemat, perhaps, or a menu, the surfaces which he preferred to write on above all else. He did not see me. His back was turned and the light touched the thin places in his waistcoat with a soft shine. His habit of keeping his shoes on until the moment he stepped into bed gave him an air of expectancy at this hour; he would arise soon and go out for a visit, or perhaps someone was coming to visit him. Suddenly I believed that if he turned out his light, every light in the world would go out. Then there would be no more left of him than the hucklebone of a saint. When the sun came up, his light disappeared. I was awakened by the sound of shoes dropping, and I dozed intermittently until I heard him shuffling quietly downstairs. There was a brief clatter in the kitchen and then the smell of coffee. I pulled on my clothes and went after him, trying to remember if my grandmother was already dead, if they had buried her yet, or if they would bury her today, but the only person I could find was Oskar. He poured me half a cup of coffee and filled the other half with milk. "Do you want to take a little walk to the park?" he suggested. "Before anyone else gets up?" We walked slowly past the teeter-totters and sat down in the swing, though the seats were wet with dew. My uncle glided back and forth, trying to keep his swing even with mine, swinging without a word, as though the morning had turned him young again and he knew no more what had happened to Grandmother than I did. ## The Doctrine of the Leather-Stocking Jesus ON THE DAY BEFORE Easter, in my father's garage, just before supper, I drew a chalk circle around Galen Malory, and said, "Now I am going to change you into a donkey." "Don't," pleaded Galen. He was five, three years younger than I, and the second youngest of eight children. His father had worked for forty years on the assembly line of the biggest furniture factory in Grand Rapids and was given, on retiring, a large dining-room table with two unmatching chairs. On holidays Mr. Malory sat at one end and Mrs. Malory sat at the other, and in between stood the children on either side, holding their plates to their mouths. The rest of the time, they ate on TV tables all over the house. "Now you will turn all furry and grow terrible ears," I said, smoothing my skirt. "Heehaw." "If I turn into a donkey," shouted Galen, "my mother won't ever let me come here again." "Too late," I howled, rolling my eyes up into my head. "I don't know how to undo it." Suddenly Mrs. Malory rang her cowbell, and all over the block children leaped over hedges and fences and fell out of trees. "I have to go," said Galen. "See you." As he ran out of the garage he bumped his big furry nose on the rake leaning against the door. He stopped, reached up and touched his floppy ears, and burst into tears. Out of sight of God-fearing folk, we sat together on the compost pile where three garages met, and we wept together. I stared at Galen's ears, large as telephone receivers, and at his big hairy lips and his small hands browsing over all this in bewilderment. His hands. His hands? I looked again. I had not turned him into a donkey. I had only given him a donkey's head. And I thought briefly and sorrowfully of all the false gifts I'd given him. The candy canes I hung on his mother's peonies, left there, I told him, by angels. "Dear God," I bellowed, addressing the one power I did believe in, "please change Galen back." "Somebody's coming," whispered Galen, terrified. "I think it's my father." An old man in a brown overcoat and curled-up shoes was crossing the snow-patched field, poking the ground with a pointed stick. He was spearing bunches of dead leaves and tucking them into a white laundry bag. "That's not your father," I said, "and he doesn't even see us." But who could fail to see us? The old man skinned the leaves off his stick like shish kebab, put them in his pack, and sat down half a yard from us, nearly on top of the hole where a little green snake once stuck her tongue out at me. He pulled a sandwich out of his pocket and ate it slowly, and I saw he had dozens of pockets, all bulging, and sometimes the bulges twitched. We watched him wipe his hands on his coat, stand up, and turn toward us. "Once a thing is created," said the old man, "it cannot be destroyed. You cannot, therefore, get rid of the donkey's head. You must give it to somebody else." "Who?" asked Galen. "Me," said the old man. "I asked God to get rid of it," I said. "I _am_ God," said the old man. "See if you can change me into a donkey." The smell of crushed apples and incense filled the garage when God stood in the center of the chalk circle and my voice weaseled forth, small and nervous. "Now I am going to change You into a donkey." And because it was God and not Galen, I sang the rhyme that expert skip-ropers save for jumping fifty times without tripping: "Now we go round the sun, now we go round the stars. Every Sunday afternoon: one, two, three—" Then I saw God stroking the tip of His velvet nose with one hand. His eyes, on either side of His long head, smiled at Galen's freckled face. "After all, it is not so dreadful to be mistaken for an ass. Didn't Balaam's ass see My angel before his master did? Wasn't it the ass who sang in the stable the night My son was born? And what man has ever looked upon My face?" "We have," said Galen. "You looked upon my God-mask," said God. "Only the eyes are real." He stepped out of the circle, opened His bag of leaves, and peeped inside. "What are you going to do with all those leaves?" I asked him. "I save them," said God. "I never throw anything away." The leaves whirled around as if a cyclone carried them, as God pulled the drawstring tight. And suddenly He was gone. And now I smelled the reek of oil where my father parked his Buick each night, and an airplane rumbled overhead, and Galen was jumping the hedge into the Malorys' yard, and Etta called me for dinner. And, conscious of some great loss which I did not understand, I went. My mother and my sister Kirsten had already left for church to fix the flowers for tomorrow's service. Etta the babysitter and I ate macaroni and cheese at the kitchen table, out of the way of the apples waiting to be peeled, the yams and the onions, the cranberries and avocados, and the ham Etta had studded with cloves. I wanted to tell Etta all that had happened, but when the words finally came, they were not the words I intended. "Do you know what Reverend Peel's collar is made of?" "Linen," said Etta. "Indian scalps," I told her. "Do you know what chocolate is made of?" "It comes from a tree," said Etta. "It's dried blood," I said. "Who told you that rubbish?" she demanded. "Timothy Bean." "A nine-year-old boy who would shave off his own eyebrows don't know nothing worth knowing," snorted Etta. Etta gathered up our dishes and rinsed them in the sink. "Can we go over and see the Malorys' new baby?" I asked. When we arrived, Mrs. Malory and five of her daughters had already gone to church to make bread for the Easter breakfast. The Malory kitchen smelled of gingerbread, but nobody offered me any. It was so warm the windows were weeping steam. The corrugated legs of a chicken peeked out over the rim of a discreetly covered pot. Etta comfied herself in the Morris chair by the stove, mopping her face with her apron as she crocheted enormous snowflakes which would someday be a bedspread. Helen Malory, who was nineteen, plump, lightly mustached, and frizzy-haired, sat in the rocker nestling her baby brother in her arms. She was newly engaged to a mailman. Thank God! said my mother when she heard it. Helen's got so many towels and sheets in that hope chest down cellar, she can't even close it. Today Helen had given Galen a whole roll of shelf paper and some crayons and now he and I were lying under the table, drawing. Because tomorrow was Easter, I drew the church: the carved angels that blossomed on the ends of the rafters, the processional banners on either side of the altar, the candles everywhere. Galen drew Nuisance, the golden retriever who at that moment slept beside the warm stove. The dog's head would not come out right, nor the legs either, so he drew Nuisance wearing a bucket and walking behind a little hill. Tenderly Helen tested the baby's bottle on her wrist and touched the nipple to its mouth. The baby squinted and pawed the air and milk sprayed down its cheeks. The lace gown it would wear tomorrow for its baptism at the eleven o'clock service shimmered in a box on the kitchen table. Etta was allowed to touch it before Helen put it safely away on top of the china cabinet. "What are you giving him?" inquired Etta. "Scalded calves' milk," said Helen. "You could add a little honey. That won't hurt none. John the Baptist ate honey in the desert and he grew up strong as an ox." As Etta spoke, she peered at the baby knowingly over her glasses. "Is that a scratch on his nose?" "He scratched himself in the night. His nails are so small I don't dare cut 'em," explained Helen. "If it was mine," said Etta, "I'd bite 'em off. 'Course I'd never bite anyone else's baby," she added quickly. A white star gathered slowly at the end of Etta's crochet hook. Comfort and mercy dropped upon me in good smells that filled the kitchen. I was in heaven. I was lying in a giant cookie jar. Cuckoo, cuckoo, shouted the bird in the living-room clock. On its fifth cry, the grandfather clock in the hall started bonging away, nine times. "Galen, take your thumb out of your mouth," said Helen. Galen took it out and examined the yellow blister on the joint. "I had a niece who sucked her thumb," observed Etta. "Her mother tried everything. When she got married, her husband said, 'I'll break her of it.' She finally quit when she lost her teeth." "Better to suck your thumb than smoke," said Etta. "Why?" I asked. "It's wicked," said Helen. "It'll stunt your growth," said Etta. "I had an uncle who smoked young. He never grew more'n three feet tall." Deep in a shaggy dream, Nuisance growled and thumped his stubby tail. "I think I'll latch the screen," said Helen, and she stood up fast. "Caleb Suarez told Penny if she wouldn't go out with him tonight, he'd come and break down the door. But I do love the fresh air." "You want to go upstairs and see Penny's stuff?" whispered Galen. "Sure," I whispered back. I was more comfortable in the same room with Penny's stuff than with Penny. Penny was sixteen and religious, but like every other girl in the high school, including my sister Kirsten, she dreamed of Caleb and would dream of him long after she was married to someone else. Whenever she looked at her mother, she would burst into tears, and her mother would shout, "So sleep with him! Go ahead! But let me tell you, you can't get away from your upbringing. You'll feel guilty all your life. It's a sacred act, you don't just do it with any boy that comes along." Caleb had black hair, all ducktailed and pompadoured, blue eyes, a handsome face, and a withered arm—the scar of infantile paralysis, my mother explained. His father was one-quarter American Indian and owned the Golden Cue Pool Parlor and came, when Caleb was six, from Sioux City to find his relatives in Northville. There were no relatives, and as far as anyone could see, there was no wife. Caleb spent his days at the fire department, reading and waiting for fires, and his nights drinking at the Paradise Bar. "He's read all the books in the library; now he's starting the second time around," said Mr. Malory, shaking his head at such folly. "I will say one thing for him, though. I've never seen him drunk." Galen turned on the light in the room Penny shared with Helen. Over a dressing table littered with bottles hung a big, framed picture of Jesus, surrounded by photographs of brides clipped from the newspapers. "That's Penny's," said Galen, pointing to the picture, though his voice was too loud for the room, as if he were shouting before a shrine. "We gotta go now." "Did you tell anyone about God?" I asked. "I wanted to, but I couldn't," said Galen. "Me neither." Down the hall, Helen was putting the baby to bed. Suddenly it cried furiously, and Galen and I hurried back to the kitchen. Seeing us, Nuisance lifted his head, and his rabies tags jingled like harness bells. "Here, Nuisance," I called. "His real name is Winthrop," said Galen. "He has a pedigree. If he had the rest of his tail, he'd be worth a lot of money." Nuisance loped after me into the dark dining room, his nails clicking on the bare floor. China gleamed on the sideboard like the eyes of mice. "Galen, get me a piece of chalk." "If you change Nuisance into a donkey," said Galen weakly, "my mother will never let me play with you again. That's my dad's best hunting dog." But he brought the chalk. "Sit, Nuisance," I commanded. Nuisance rolled over. I drew the circle around him and stepped back. "Out of my way, Galen." Galen did not need to be told twice. I fixed my eye on the golden shape of Nuisance, motionless, save for the stump of tail, which wagged. "Now I am going to change you into a donkey," I whispered. And because it was Nuisance and not Galen, I sang to him: "Nuisance go round the sun, Nuisance go round the stars. Every Sunday afternoon: one, two, three—" The sweetness of apples and incense hovered around us again. But nothing happened. Then suddenly Nuisance jumped three feet into the air and, barking wildly, charged across the kitchen and crashed through the screen door. Etta shrieked and Helen came running. "Is it Caleb?" she yelled. "Nuisance broke down the door," shouted Etta. "You better lock him up good." Galen burst into tears, and Helen sank to her knees beside him. "There, there, honey lamb. No one's going to hurt you. Helen will lock the doors and windows." She held his head against her neck. "And I'll let you play with my Old Maid cards." Galen's shoulders stopped shaking. "And I'll even let you touch my new lampshade." "Can I go down cellar and see your chest?" Galen said in a sodden voice. Flicking the switch by the cellar door and taking each of us by the hand, Helen led us down the steps, dimly lit, past a clothesline sagging with diapers, to a big brassbound chest. "Can I open it?" snuffled Galen. "Go ahead," said Helen. So Galen lifted the lid very slowly. It was like a thing from dreams, this box, big as a coffin, full of bedspreads and blankets and dishes. This is the way I would like to keep my whole past, I thought, folded away where I could take out last year's Christmas or my first birthday and play dress-up whenever I liked. Resting on top of a blue glass platter painted with turkeys, the lampshade waited. It needed a light to show clearly the man and woman walking in a garden painted on the front. "I got it for seventy-five cents at a rummage sale," Helen announced proudly. "It's not paper, either. It's real satin, and all clean." "Too bad it's purple," I said thoughtlessly, and then, seeing I'd hurt her, I added, "but I like the two people in the garden." "What comes after the garden?" asked Galen, pointing to the edge of the picture. "Nothing. Don't poke at it," said Helen. And she herded us upstairs. Etta had gotten control of herself and was crocheting as if nothing had happened, but her face looked like bleached flour. The lower half of the screen door was hanging out, torn in two—I touched it, awestruck. Helen went to the sink and started snapping the stems off the beans heaped on the drainboard. "Etta," I said, and I felt my tongue thicken in my mouth, "Did you ever see God's face?" "Nobody has ever seen God's face," said Etta. "Only His hinder parts." Helen touched her buttocks absentmindedly. "His what?" said Galen. "His hinderparts," repeated Etta. "Nobody will ever see His face till the last day." Etta knew the Bible better than any of us, but she didn't know I gave God the head of an ass. "How do you know which day is the last day?" asked Galen. "When all the signs have come to pass, that will be the last day," said Etta. "Oh, of course they won't all come at once. They'll be spread out over the centuries, for a thousand years in the Lord's sight are but as yesterday when they are past." "Something's burning," exclaimed Helen. She peeked into the soup pot, pushed the chicken legs down, clapped on the lid like a jailer, and turned off the stove. Then she said to Etta, a little sadly, "All those things are mighty hard to understand—" A crash outside cut her off. For an instant none of us moved. "The raccoon is rummaging through the garbage pail again," Helen squeaked. "He comes pretty near every night." We all exhaled. "Go on about the signs," I urged Etta. Etta smoothed a finished snowflake across the back of her hand. "When my grandfather was a little boy, he saw the darkening of the sky. That's one of the signs. The cows came home and the chickens went to roost just like it was night. And stars fell out of the sky. People thought they would get burnt up, and some folks killed theirselves." "Is this a ghost story?" asked Galen. Etta scowled at him over the top of her glasses. "I'm telling you what's in the Bible." She opened her purse and pulled out a small book bound in white paper. "It's the new translation, and it only costs twenty-three cents. You could own three of 'em if you wanted to. And it's got pictures. See—" "Who's that wild man?" demanded Galen. "Where? Where?" cried Helen. "There." He pointed to the picture of a hairy man dressed in skins waving a big stick. "That's John the Baptist," explained Etta. "But I believe this one is my favorite. It's from Revelations." Over a crested wave, the red sun and the black moon bobbed like apples, and fish floated belly up among the spars of sunken ships. "And every living soul in the sea shall die," said Etta. "Fish don't have souls," said Helen. Etta frowned. "But that was the title of our lesson last week! What could it mean, then?" "Don't fish have souls?" I asked, surprised. "Of course not," answered Helen. "Only people go to heaven." "What happens to the animals?" I hardly dared ask her. "They turn back into earth." "All of them?" "All of them." And my lovely spotted cat that loved nothing better than to nap by the stove in winter, would she too lie down in darkness? But I knew there was no point in asking about special cases if the rule applied to all. No doubt God didn't want puppies chewing up His golden slippers and peeing on His marble floors. I felt like crying. I could not imagine a world without animals. Even if I had none around me by day, I would need them at night. For whenever I could not sleep my mother would say, count sheep. I counted, one, two, three, four, and waited for the sheep to appear. But it was always buffalo that came to be counted, shaggy yet delicate, as if sketched on the walls of a cave. They floated out of the wall by my bed, crossed the dark without looking back at me, and passed silently into the mirror over my dressing table. Suddenly I thought: if God doesn't mind wearing an ass's head, then why doesn't He let the whole animal into heaven? "Not a one will get there, because they have no souls," said Helen. "Do you think Nuisance will come back?" asked Galen. Helen sighed. "Dogs always come back." "Tell some more signs," I said. "In the last days," continued Etta, "God will send His star, just like He did when Christ was born. It will look like a big hand coming closer and closer. And then God will appear, not just to a few people in Sweden or Japan, but to everybody at once, like lightning." Somebody tapped on the window over the sink, and a man's face lurched past, like a cracked moon. "It's Caleb!" screeched Helen. "Don't let him in!" We all rushed to close the kitchen door, but Helen rubbed the latch on the screen the wrong way, and in walked Caleb with his hands up, empty whiskey bottles on all his fingers. "I've come to pick up Penny." "Penny is at church," said Helen, her voice shaking. "Church? Well, I'll wait for her." "Suit yourself," sniffed Helen. "When my father comes home, you'll get it." "Me and your old man are going hunting together next Sunday. Doves are thick this year." "You shoot doves!" cried Etta. "Dreadful!" Caleb shook the bottles off his fingers, one by one, and lined them up against the stove. Then he pulled off his sheepskin coat and threw it on the floor. Then he kicked off his boots. I could see skin peeking through his black socks like stars. "Tell your dad to keep his bottles at home," said Caleb. "Tell him I saw ten empties running up Mulberry Street like a pack of dogs." He drew up a kitchen stool and sat down. "You can wait here till doomsday," snorted Helen. "No girl will look at a man who can't make a decent wage for himself." Caleb smiled. He'd seen plenty of girls looking. "I make a decent wage. I got my own place now too. A little cabin behind Mount Holly. No water except for a stream. No electricity. No cops." And then he added as if it had just occurred to him, "Why doesn't Penny want to go out with me?" "Because you're no good," Helen said. "I ask you, what woman wants to sit up with a man on Mount Holly? A woman likes to be comfortable." "Penny said that?" asked Caleb, surprised. "Mother said it," admitted Helen. I knew it was all over now with Mrs. Malory. Caleb's revenges were swift. When a Mercedes nosed his old Ford out of a parking place, Caleb came back to let all of the air out of the tires and stole the hubcaps. He sent snakes to those who spoke ill of him; Reverend Peel's wife received one in a teakettle, sent anonymously, which slithered out of the spout the first time she filled it with water. "What do you do on Mount Holly?" I asked him. "I watch for forest fires and make shoes." "Shoes?" exclaimed Etta. "Who taught you how?" "I taught me. When I've learned everything there is to know about leather, I'm going out to the West Coast to make me a fortune." A thin wail brought Helen to her feet. "The baby wants his bottle," she said brusquely, and hurried out. "If you ever need a sitter," Caleb called after her, "I'm available." Etta snorted, but Caleb paid no attention and turned instead to Galen. "I've got a little present here for Penny." And he bent down and began searching through the pockets of the coat he'd thrown on the floor. A couple of quarters spun out on the linoleum. A key ring with a medal on it plunked at his feet. "What's that?" I asked. "That's Jude, Saint of the Impossible," he answered, pocketing it and still searching. "But you ain't Catholic, are you?" said Etta. "No, I'm not Catholic. I got it from a buddy in the army." "Do you believe in God?" persisted Etta. Caleb shrugged. "When I was an altar boy in Sioux City, I wanted to be a preacher." "You! A preacher!" shouted Etta, turning red. "The way you drink!" "Christ drank," said Caleb quietly. "And running around with women!" "Christ ran around with a lot of women." Etta was speechless. She wanted to walk out on him, but she could not take her eyes off what looked like a couple of leather bandages he was unrolling across his knees. Black leather, painted with flowers, the toes tooled with leaves, the cuffs studded with nails and, unmistakably, silver garters at the top. "What beautiful boots," I told him. "These are stockings," he corrected me. "Leather stockings?" exclaimed Etta, astonished. "I never heard of leather stockings." "Well, now you have," smiled Caleb. He picked one up and stroked it like a cat, then laid it across the kitchen table. For the first time I noticed he used only one arm. I nudged Galen and whispered: see, one arm. "How did you hurt your arm?" asked Galen. I saw Etta close her eyes. "Jumping down Niagara Falls when I was young." Etta opened them again. "How old are you?" I asked. "Twenty-three." This saddened me. Anybody over nineteen was, in my mind, old enough to be my grandmother. As Caleb was leaving, we heard Helen tiptoeing down the stairs. Waving to us, he called over his shoulder. "I'm going to church, ladies. And if Penny is with anybody else except her mother and her sisters, I'll cut him in two." The privet hedge was wet with dew. I hoped no slugs would drop on us as Etta pushed our way through. My mother, barefoot, in her bathrobe, let us in. "It's nearly midnight! Where have you been?" she hissed. But instead of scolding Etta, she scolded me. "If you want to get up for the sunrise service," said Mother, "you'd better go to bed instantly. You and Kirsten are sleeping on cots in the kitchen. Your aunt and uncle are here. Etta, I made up the sofa bed for you. It's too late for a cab." "My nightgown is in my room," I whispered. "Never mind your nightgown," said my mother. "Uncle Oskar's asleep in there. You can sleep in your underpants. And if you smell the ham burning, wake me up. I've got it on low." Kirsten was sleeping in the middle of the room with a pillowslip over her head, which she started wearing the night a bee crawled into her hair. Though I lay perfectly still, I could not fall asleep. The buffalo did not come to be counted, and the enamel pots hanging on the walls watched me like a dozen moons. I heard my cat scratching faintly at the front door. I got up and opened it, and somebody pulled me outside. But outside was inside; all around me, torches sputtered and popped, clothes smelt of pitch, and my spotted cat was no cat at all, but a girl in a pied gown who scampered away down the aisle that opened at my feet. The church looked fuller than I'd ever seen it. In front of the altar, Reverend Peel, by the light of the acolyte's torch, was censing the people with a sausage in his left hand and a pot of smoking shoes in his right. He had wreathed his bald head in poppies, turned his vestments wrong side out, and thrown away his glasses. _"Kyrie eleison kyrie eleison"_ shouted the choir from the balcony over my head. And the people shouted back, Heehaw! Heehaw! Heehaw! Helen was walking, with measured tread, down the center aisle, holding the baby wrapped in a rabbit skin. Diamonds blazed on her hair and on her eyelashes and on her white gown. The King is coming, whispered Mother into my ear. The King is coming from a far country to bless the baby. Everyone turned. A donkey was walking down the aisle, its ears crowned with ivy, its legs sleek in black leather stockings, a scepter locked between enormous teeth. The moon sprang out of its left ear, the sun out of its right. Riding before it on a black goat, Caleb, splendid in white buckskins, strewed grapes for the donkey's hooves to crush into wine. And loping along behind came Nuisance, ribboned with penny whistles piping by themselves. Now a shout went up from every throat. And in that instant I knew this was no donkey, but a magician disguised as a donkey, and one far more powerful than I. Slowly the beast turned around, showing its handsome black stockings. It stepped up to the altar and laid aside the scepter. Helen held up the baby and it touched the holy water to eyes, lips, and ears. When it finally spoke I knew the King had always been speaking, only I had not had the ears to hear. It did not ask Helen to abjure the devil and all his works, yet I knew it was not the devil. It did not promise salvation, yet I was sure it had come to save us. "And some there be," said the donkey, speaking very quietly, "who have no memorial; who are perished, as though they had never been." Over our heads, the carved rafters remembered their names: oak, ash, maple, and pine. They put out bark and leaves, and the angels carved there were no more. The scepter shrank to a hazel wand, but the beast did not notice. "But these were merciful men," it continued, "whose righteousness has not been forgotten." The glass in the windows blew away, sparkling like a million grains of sand. The pews rolled up into logs, grass grew between my toes, I could not see who stood beside me, and I could no longer remember my own name. But the donkey's voice breathed over me like wind across a field: "Their seed shall remain forever. Their bodies are buried in peace, but their names live forevermore." Then, not three feet away from me, Etta turned over on the sofa bed and sighed deeply. The morning air raised gooseflesh all over me as I awakened, and I knew it would be cold on Steeple Hill when we gathered at the cemetery for the sunrise service. Up on Steeple Hill, where all our people lay buried, a wind bowed the bare trees and sent the clouds scudding like foam as we waited for Reverend Peel to open the gates to the cemetery. Most of the fathers, including mine, were home in bed. Over the heads of the women and children, the gold cross swayed in the pastor's hands. The acolyte lifted the Easter banner high as a sail; its embroidered lamb sank and swelled, all heartbeat and pulse in the wind. "Where is the sun?" I asked my mother. "Behind the clouds." "But how do you know, if you can't see it?" "Because it's light outside." Kirsten fiddled with the little silver cross she wore only on Sundays. She had a new pink coat, and I caught myself wondering how long before she'd outgrow it and I could have it. His vestments blowing like laundry, Reverend Peel threw open the gates at last, and we marched in singing: "Holy, holy, holy! Lord God Almighty! Early in the morning our song shall rise to Thee!" Are the dead surprised? Do they look at us, do they look at me? Does an old woman see her features in mine, does an old man see in Kirsten his young wife who died so long before he did? Do they sit in their graves as we sit in our pews, are we the service they wait for? We walked two by two, singing bravely against the wind: "Though the darkness hide Thee" How lovely it was there in the morning! Patches of snow gleamed in the shade of the headstones, but everywhere else the grass showed damp and green, though it had lain there the whole winter. ## Theo's Girl SHE WOKE UP SUDDENLY, with the feeling that she had overslept an exam. Someone was throwing stones at her window. She peered at the luminous dials of the clock; the hands said four. If I can get outside without turning on the lights, she thought, I won't wake anybody up. But there was her mother, standing at the foot of the stairs. "It's a mighty funny time to be going out with him," she observed. "Did you sleep in those clothes?" "I just lay down in them. I didn't want to miss him." "Sit down and eat. I got oatmeal made and everything. You want to ask Theo to come in?" She couldn't get up earlier than her mother, try as she might. There was always that oatmeal waiting for you, no matter how quiet you were. "I don't have time. He'll be late." Her mother made a motion as if to throw it all in the sink, and Erica repented. "Save it for me," she said. "Save it till we get back." Theo was in the truck, drumming his fingers on the side-view mirror, and she squeezed in beside him. The back, empty now—its double doors clearly visible—resembled a sepulcher. "Did you wake your mother?" "Nope. She's still in bed." "She didn't think it was funny? Like we were eloping?" "No. She knows I wouldn't do a thing like that." It sounded hollow, it hung in the air like a defeat. She should have been capable of it. As they drove out of the city and turned onto the superhighway, Theo stretched in his seat and leaned forward, resting his elbows on the wheel. "Well, this is another job I'm going to lose. I've been late the last three times. It takes an hour to get to Detroit, another hour to bring the bagels back, and there's a line of people outside Sol's store by eight." "You overslept." "Clock didn't go off. The cat slept on the plunger." They rumbled along quietly; she was falling asleep. "Hey, wake up! Did I tell you about my new job?" "Another job?" "Yeah. At the undertaker's. There's a German family in town, wants me to make a death mask of the uncle." "Aren't you studying for your exams at all?" He gave a grand wave of his hand. "I got all my sculpture projects in. All I have is French." She leaned her head against the window, trying to keep awake. For days she had imagined the two of them, rolling softly, secretly, into the morning, and here she was, hardly able to realize it. The broad backs of the Ford factories glittered past, the river and the island flashed at them once and disappeared. When she opened her eyes, the heat of the city laid its weight on her, and the bakers were already running back and forth, red-faced, stuffing the last bags of bagels into the back of the truck. "You goon! Some company you were!" laughed Theo. But it was the trip home she loved best anyway, she decided, when the bagels filled the whole cab with a smell of onions and fresh dough. Theo reached behind and feeling the top of the bags, helped himself to a bagel, broke it, and handed her half. In silence they watched the sky lighten and the trees grow friendly again as the dark lumps of leaves opened to lacy green. The truck turned into her street; no one was stirring. "I'll pick you up later if you want to come with me." "Where?" "To the undertaker's." She lingered outside, one foot propped in the open door. "If you want me to, I will. My Aunt Minnie's supposed to come today." "She's still working to get you baptized, huh?" "No." "You know, if you let her do that to you, we're through." "I know," said Erica. "Well, what for, then?" She had half a mind not to tell him, but she was no good at keeping secrets. "She's taking us to Hannah's. Now can't you guess?" "Say it." "A wedding dress. Hannah's making it." "Jesus!" He shook his head and smiled broadly. "You really mean it, don't you?" She nodded seriously. "I'll wear my _Croix de guerre_ that I won in France." "You've never been to France," said Erica. Theo pulled a look of broad astonishment. "Would I lie to you?" "Mother says you've never been there or won any cross." "My blue heron," said Theo, reaching over to stroke the hair which swung over her face when she put her head down. "If I can just get you out of here before you start listening to your mother." Her mother was waiting in the doorway, holding her pink wrapper closed, watching them with that wistful smile she got sometimes. "I kept it warm for you." There were moments when Erica wanted to kiss her mother, like just then, but she would have felt funny doing it. Neither of them was very demonstrative. They went into the kitchen, and Erica got herself a dish and skimmed the crust off the oatmeal. Her mother beamed. "You used to do that when you were a little girl." She walked around the kitchen, talking, while her mother handed her things: orange juice, prunes, toast, always enough for a battalion. It was a mutual nervous mannerism, her mother handing her things, Erica taking them, putting them down here and there, talking while her mother beamed. Far overhead, a cracked voice burst into "What a Friend We Have in Jesus." "I forgot to tell you—Minnie came in last night," said her mother. Every weekend she came, ostensibly to get her new Ford fixed. There seemed to be no Ford repairman in Detroit. On Sundays she drove back to attend church. When the semester ended, she would move into Kirsten's old room for long periods altogether. Kirsten rarely came home to visit since she'd married and moved to San Francisco. "Minnie's taking us to Hannah's. But she's got to study." "Study?" "They're doing the new math in the fourth grade, and she says it's difficult. You got to learn it to teach it. She's got a new electric organ, she says. And a scalp vibrator." Instead of a husband, said Theo somewhere in the back of her mind, and she shuddered. But Minnie had had husbands enough. Four. Two insurance men, a floor walker, and—the first one—an engineer. Erica could not imagine what it felt like to have run through so many. A different life with each one—did they fall away like so many winters? But when you repent of your sins, all that is changed and forgiven, said Minnie. Changed and forgiven. You are a new person in Christ. A new person. And the husbands, thought Erica. Had they been baptized away, the hurts and losses drowned somewhere forever? "I ate almost all the oatmeal," she said. "I'm sorry." "Never mind. I can make some more." Thump, thump. She picked up her orange juice and wandered into the living room. Her father peered up from the floor where he lay on his back, slowly raising his legs and letting them down again. Usually he was up before any of them. Once, on a dark winter morning, she had thought it was a burglar. "We had a good time, Daddy." "Eh?" His legs paused in mid-air, and he lifted his head. His gray hair snapped with electricity from the rug. "I said, we had fun." "Where were you?" "Theo took me to pick up the bagels." "To pick up what?" He had probably never seen a bagel, let alone eaten one. "He still got that old car of his?" "No," said Erica. "It quit running. He abandoned it." "Lord," said her father. He lowered his head and closed his eyes. Then he opened them again suddenly, as if something had bitten him. "Minnie driving you to Hannah's?" "Yes." They never spoke much. It wasn't just the gap of generations, though; she didn't know what it was. Now that he was retired she felt she ought to speak to him more, but she didn't know what to say. All he could remember about Theo was that he had a broken car. Sometimes he asked if Theo had gotten the left headlight fixed yet, so it didn't shine into second-story windows when he drove at night. The voice upstairs gave way to a chorus. Erica heard hymns jogging closer, as from a wayward procession; then they clicked into silence. She went into the dining room and Minnie looked up brightly. Her hair, newly tinted auburn, had an odd shiny look, as if it were cased in plastic. "If I can just hear a good sermon," she observed, "it makes my day. It's such a blessing to me, this program. I'll be ready to go as soon as I find my teeth. I always throw them out, in the night. It's my bridge, with the two front ones on it." And then, as she pierced her grapefruit into sections with the wrong end of her spoon: "Why do old people look so bad without them? I look at my kids in school; they lose them and they look cute." In their identical pink wrappers, her mother and Minnie really did look like sisters, though Minnie was thinner and better preserved. Except she always _looks_ preserved, thought Erica, and she felt herself getting depressed, as if some blight had touched her. She let her mother bring her a cup of coffee and tried to be cheerful. "How old is Hannah now?" she asked. Her mother considered. "She must be in her eighties. Imagine, living all alone on that farm, with nothing but sewing to support herself!" "She has a brother, though," remarked Minnie. "Divorced." "No, that was the other brother," Minnie corrected her. "Jonathan went into a bakery and made real good. And when he started, he drove the wagon for twenty dollars a month." "She's got a half-sister who lives in town." "She must have married well." "No, she didn't. She taught piano all her life. I got a letter from her husband after she died, so I wouldn't send any more Christmas cards." There was a long silence, during which they all avoided looking at one another. Then Minnie said slyly, humming under her breath, "Is this your wedding dress Hannah is making?" Erica had her mouth open to speak, but her mother got there first. "It's just some white sewing. It could be a very nice graduation dress." "I thought you told me it was satin." "Lots of dresses are made out of satin these days." " _White_ satin?" "Someday I could get married," said Erica in a small voice. " _If_ she decides to get married," added her mother. "There's lots of other things she could do. Paint, for example." "You have to be terribly careful when you marry. They say you never know anyone till you're married to them," said Minnie. "Oh, I turned down some good ones, all right." "Remember Irving Tubbs? I'd say you'd have made it best with him." "Too late now," shrugged Minnie, without bitterness. But already Erica had that sinking feeling again. They always seemed to be picking on her—not directly, of course, but in conversations she felt were performed for her benefit. My blue heron, I'm not your father, Theo would say. You don't want a father, you want a husband. She thought of his little room over the laundromat; she had painted mermaids in the shower for him and had lettered his favorite epigram on a sign which he kept over his desk: ENERGY IS ETERNAL DELIGHT. Sometimes they would lie down on the bed together and listen to the flute player in the coffeeshop next door one floor down, he wholly relaxed, she with one foot on the floor. For running. That's how it is with you, he'd say angrily. Always one foot on the floor. Who do you think is going to come in, anyway? Your mother? Did you lock the door? she'd whisper, agonized. I locked the door, yes. Maybe your mother can go through locked doors? "Immersion," Minnie was saying. "What have you got to lose? If the Bible says that you shall be saved through water and the spirit, why take the risk?" "I'd feel a little odd about it," her mother answered. "If it's so good, why don't the Lutherans have it?" Minnie shook her head. "Billy Graham preaches it. I'd arrange for a very private service." "And you wouldn't tell anybody?" "Not a soul." Still her mother hesitated. "Could I wear a bathing cap?" "Did Christ wear a bathing cap?" asked Minnie severely. Suddenly Erica felt ill. Why don't you say it, she thought angrily; he's an atheist, a confirmed atheist. It never bothered her until they talked about immersion, and then only in a sort of superstitious way because she felt she might be missing out on something—a heavenly reward she wasn't sure she deserved but might, by some fluke, get anyhow. It was that feeling of something left undone that bothered her most. Prudence—the seventh deadly virtue, Theo called it—and sometimes she felt that Theo was more religious than all of them put together. But art is not a religion, said Minnie. All the painting and sculpture in the world won't gain you the kingdom. Erica had, somewhere, a paper napkin on which he had written, "Someday I will show you all the kingdoms of _my_ world." They were sitting in the German restaurant downtown, which was always so full at noon that they could hardly hear one another. What kingdoms? she asked him then. My blue heron, he said. My little Eurydike. And a few days later he took her to see his city, which he was starting to build on the empty lot behind the laundromat. It was a city to be made entirely of junk, he told her. Already she could see it rising into shape as they walked between the walls made of washing machines, fire hydrants, clocks, mirrors, and fenders; between the towers made of wagons and marbles, bicycles and animal skulls, wired and cemented together: all the paraphernalia of human life. And it shall be fifty cubits long to the east, Theo intoned, and fifty cubits to the west. And there shall be a hundred furnaces beneath the foundations and a hundred mirrors to catch the sun. And over the flagpole, a garbage can. Where did you get the parking meter? I took it from my room, said Theo. Didn't you see it in my room? I used to time my eggs by it, when I had a hotplate. He sat down on a large bed, painted silver. He had stuck paper flowers in the springs. Around it the walls glittered with bedpans, coffeepots, and false teeth. I have a hundred and five sets of false teeth, he declared solemnly. And a medallion of William Blake. You've got to learn how much is worth saving in this world. Later they were crossing the alley behind Woolworth's on the way home from the nine o'clock show, and they both saw it: a pair of legs sticking out of a trash can. Jesus! Somebody's fallen in! The feet were hollow, the legs straight. Pushing aside broken boxes and excelsior, they set them upright. Too bad it's only the bottom half, said Theo. Who'd throw out a thing like that? Are you going to keep it? asked Erica. Put it in the city, he answered. Grow beans on it, or roses. All my life I had to look at saints and flamingoes in my mother's garden. Nobody ever had a pair of legs like these. You take his feet. As they emerged from the alley, a black car pulled up across the street. Just keep walking, said Theo. And follow me. He was humming happily to himself. He turned the corner with easy nonchalance and broke into a gallop. Erica, holding the feet, felt herself pelting after him. You want to rest? he said at last. They had stopped in front of the drugstore; a balding man in a pharmacist's white jacket was rolling up the awnings. The neon lights in the window winked out, leaving them in the blue mercurial haze of the street lamps. The streets were empty. They set the legs down on the pavement and seated themselves on the curb. In spite of the warm air of summer almost here, Erica felt a great weariness flood her like a chill. Theo reached over to touch her hair when she lowered her head. Will you come and live in my city? They arrived at Hannah's early in the afternoon. Hannah, on hearing the car, had come out to meet them and was standing by the pump in her long blue print dress. Behind her, the house, low-slung and weathered nearly black, crouched in the shadow of several freshly painted barns. She seemed to have been born ancient; Erica could not remember a time when her thin hair, tucked under the green eyeshade, was not already white. "Afternoon," said Hannah, shyly. As they stepped up to her, she kissed them one by one, a dry musty kiss on the cheek. The pincushion she wore at her lapel pricked Erica's face. Hannah led the way through the kitchen. The low ceiling made Erica want to stoop. There was a wooden sink, deeply stained, and an enamel bucket with a chipped rim beside it. On a pedestal near the front door, a large Christmas cactus trailed its branches in all directions. "A hundred years old," said Hannah proudly, "and it bloomed this year. I called the paper about it, but Mrs. Schultz had already called them about _her_ cactus, and they wasn't interested in two of 'em." "But you aren't a hundred years old," exclaimed Erica. "It come with the house, I think. Oh, I could have had a sign out in front about the house, but Jonathan was never much on publicity." They went into the living room for the fittings. Boxes of cards and buttons spilled over the wicker sofa onto a piano, which served as a shelf for photographs and birthday cards and was by this time nearly inaccessible; the keyboard looked permanently shut. On the sewing machine, with its faint traces of elegant scrolls, a cat lifted its head and blinked at them, then stretched itself back to sleep again. For some reason the signs of faith were less depressing here than they might have been at home, thought Erica, forgiving Hannah the ceramic plaque, JESUS NEVER FAILS and the sign lettered in silver paint, GOD GRANT ME THE SERENITY TO ACCEPT THINGS I CANNOT CHANGE. On the walls, the sepia faces of an earlier generation looked out from absurd gilt frames. They were always stiff, her father told her, because the pictures were time-exposures and you had to wear a clamp on your neck inside the collar, that kept you from moving. Suddenly she saw it, hanging on a coat-rack shining out over the faded coats brought in for mending and the shapeless dresses of old women. "You want to try on the white sewing first?" asked Hannah, noticing her gaze. "It's just basted." Her mother started to hum. "I got some stuff for you to do, when you're done with that," she said. And Erica saw her studying the pictures on the wall, pausing before a confirmation certificate, lettered in German, showing in faded tints the parables and deeds of Christ. Stuck on the frame was a tiny star-shaped pin, from which several bars fell in ladder-fashion: five years, ten years, fifteen years. "You never miss a day of church, do you, Hannah?" said her mother. "I'll bet nobody's got a record like you do." "Raise your arms," said Hannah, and Erica felt the sudden cool weight of satin falling over her body. "Only one man had a better record than mine; he got the twenty-five-year bar, but the last year they had to bring him in on a stretcher." She stood with her arms out while Hannah pinned and clucked to herself. Her hands were warm and light, almost like mice walking on her flesh, thought Erica. Minnie cleared a place for herself on the sofa and stretched out, running her eye over the dresses on the coat-rack. "That's a handsome black one," she said. "Who's that for?" "Me," said Hannah, "to be buried in. Thought I might as well get some wear out of it." "Remember how Grandma had a dress she kept in her drawer to be buried in? White wool, it was." "Fits pretty good," said Hannah. "Now, try on this overslip." She shook it over Erica's head—light, vaporous stuff, embroidered with flowers. Full-skirted like a child's dress. Theo hated full skirts. Minnie bent forward to examine it. "Imagine," she said, "a machine to put in all those flowers." "How does it fit around the arms?" Erica nodded. "Good. 'Course it'll take a little time—" "No hurry," snapped her mother. "—since I lost my ripper. I told Mrs. Mahoney to pick me up one somewhere." "Mahoney?" mused Minnie. "Not Jack Mahoney?" "He's dead now, just tipped over quick," said Hannah. "Seems like all the people I went with are dead now," said Minnie softly. Erica edged herself carefully out of the white dress, trying not to prick herself with pins. Her mother had already put on a lace one. Hannah and Minnie eyed her critically. "Lace," observed Hannah. "Looks like you're going to a wedding." "No wedding," said her mother. "Make it an inch shorter, don't you think, in the front? I haven't got a bosom like this—" She pulled the front out like a tent. "'Course, skirts is shorter now," said Hannah reluctantly. "Even the choir wears 'em shorter. 'Course a thing goes across the front so it don't show their knees. I could put some darts in the front." "The lace is torn, too. Do you mend lace?" "Lace isn't good except for weddings," said Hannah, shaking her head. He wouldn't like the dress, thought Erica. She scowled at it, hanging on the coat-rack. He wouldn't like it because her mother had picked the design, not for his marriage, but for marriage in general. Somehow the dress looked like her mother. She did not know why. Late in the afternoon, Theo appeared at her house, dressed in a black suit with a bag of tools at his side. "You coming with me to the undertaker's?" She had not told her mother about this job. They took her bicycle, she sitting on the seat, he pumping in front, his haunches striking her in the stomach as they pitched uphill, past the park. "I can get off, if you want to walk." "No, you're light enough." When they arrived at the funeral parlor, they were both damp with effort. They reached for the knocker, but a man in a moth-gray suit had already opened the door. Over his shoulder, Erica saw the rooms, with their high ceilings and French doors, opening into infinity, multiplying like a house of mirrors. She remembered this house from her grandmother's funeral: the parlors where the dead awaited visitors and the carpets that flowed from one room to another, gathering up all human sounds. Was it in this large room that they had laid her out and Erica had cried, not for grief, but because her mother was crying? The man led them over to a small group of people huddled together on a sofa at the other end of the room: two men and two women, all middle-aged, with pointed sallow faces. The women had covered their heads with black lace mantillas. "This is the young student." They rose and looked at him rather severely, then turned to Erica. "My wife," said Theo. "She assists me." The women removed their gloves and extended their hands to her. Then the taller of the two men inquired in an accent so pronounced that Erica wondered if it were real, "You have done this before? You know—" "Of course," said Theo. "I have studied the trade in Germany." "Well, then!" They all looked immensely relieved. With a polite nod, the undertaker indicated that they might sit down and motioned Theo to follow him. The body had been laid out, fully dressed, on a table and wheeled into a private room, empty save for a sink at one end. For a moment Erica caught her breath, but Theo gave her a look, and she said nothing. The undertaker lingered a bit. "Won't take you very long, I suppose." "No, not very long. You will excuse me—I prefer to do this work alone." Blushing deeply, the other man muttered a little and bowed into the doorway. "His face has already been shaved." Pause. "The family will be down in—say—half an hour?" Theo nodded and waved him away. The door slammed, and his composure vanished. "Open the tool case quick," he said. "Twenty minutes. Get out the plaster of Paris. Can you mix plaster of Paris?" "I think so." She rummaged through the little bag, pulled out a chisel and a towel, then a tin bowl and the bag of plaster, carefully averting her eyes from the body. Thinking only of what she must do with her hands, she carried everything to the sink, filled the bowl, turned on the water, and began to stir. "Stir faster," cried Theo. "You never really were in Germany, were you?" "Christ, no. Give me the plaster—quick, before it dries." Now she stepped forward and watched, fascinated, breathing very lightly to avoid the real or imagined smell of formaldehyde in the room. Theo had spread the towel over the body, tucking it in at the collar like a napkin. The face looked much like those she had seen upstairs; about thirty, she thought, maybe older. It neither grieved nor frightened her, this thing. Theo loaded his trowel and spread plaster over the chin and nose, then lathered it over the eyes and stood up straight. "Now we wait for it to dry." He was looking cheerful again. "Who knows, maybe he'll come out looking like William Blake." A kind of chill touched her at that moment. "Where do you think he is—really?" "Right here, all there is of him." Theo was washing his hands at the sink. "Your aunt been working on you again? Listen"—he looked very fierce—"if you let her baptize you, it's all over between us. Christ, you're not marrying me, you're marrying your mother!" "They can hear you upstairs," she hissed. "Listen," he said, in a gentler voice, pointing to the body. " _This_ isn't anything to be afraid of. I've got to get you out of that house of old women." "I think it's dry." He tested the mask with his finger. "Not yet. We'll wait a few more minutes." They slid down on the floor, leaning against the wall in ominous silence. Presently Theo got up, bent over the body and took the edges of the mask in both hands. "A little cool, but it's dry enough." He tugged, carefully at first, then more roughly. "Give me a hand," he said. She stumbled to her feet and, suddenly nauseous, swallowed hard and touched the rough plaster edge over the ear. "Push your fingers under it. You need leverage. Pull!" "It's stuck!" she cried in terror. "Why is it stuck?" "I think," said Theo, in an odd voice, "that I forgot to grease the face." He had climbed up on the table by this time and was straddling the dead man's chest, clawing furiously at the mask. "Chip it! Get the chisel! We'll chip it away!" There was a muffled cry behind them, and turning, Erica saw that someone had opened the door. In the doorway stood the bereaved, their sallow faces livid with rage. The tallest man made a leap for Theo but missed. Theo was already on the ground, and he plunged like a wild horse through the door. Erica followed him, running as if the dead man himself were after them. They sat, shaking, in a cranny of rubber tires, at one end of Theo's city. The sun beat down on them, the hundred mirrors turned on their hooks and wires, and the springs, sleds, motors, rowboats, saws, clocks, flowerpots, and bedpans of humanity twirled past them. They sat in the shadow of a hundred furnaces. "Best thing to do," said Theo at last, "is to forget the whole thing. A death mask, for Christ's sake!" "If we were married and you died first, would you want to be buried?" she asked timidly, and realized, as she said it, that she was really asking something else. "Ashes to ashes and dust to dust. No coffin for me. I want to go back to the earth." A loneliness foamed up in her mouth when he said that. She had always assumed she would lie down with the rest of the family in one of the plots her father had bought years ago. Enough for the generations, he said. It wasn't a thing to take lightly. For when the trumpet sounded and everyone stood up in their graves, it was important, said her mother, to be among people you knew. But by this time, lots of bodies must have scattered to dust. The Lord knows his own, said her mother stoutly. Erica saw them all very clearly, standing up in the graves and rubbing their eyes as after a long sleep, Hannah in the black dress she'd made for her funeral, her mother in the lace, Minnie, singing along with the heavenly host because she alone knew the words to the hymns, and herself in the white dress which would be her best dress forever. "I took my French this morning," said Theo. "You didn't tell me. How was it?" "Awful. I flunked. I'm ready to pull out of this place." He touched her hair lightly. "And I want to take you with me. You got to trust me more, Erica. I'm not like your dad, but I'm all right." "What are you going to do now?" He shrugged. "Go to some city, I guess. You can always find people in a city." Suddenly restless, he jerked himself up. "It's hot here. You want to rent a boat and go the island for a swim?" "I have to go home and get my suit." "Jesus! Whoever swims near the island? Go in your underwear." "A nice day," said the old man, sitting on a kitchen stool in front of the canoe shed. He looked past the open door toward the river, as if expecting someone to appear there. "Don't know why there aren't more folks out on the water." The three of them went inside. Erica had yet to see a canoe in the canoe shed. Instead, it was full of nickelodeons, scrolled and flowered to resemble circus wagons, with the works decorously exposed. Behind little windows, the captive performers slept: drumsticks and cymbals, gears and piano rolls, perforated for the syntax of dead voices. "Sign the book," said the old man, slipping behind a counter and handing Theo a pen. "You get number twenty-five. That really plays, Miss." Erica was staring at the silver anatomy of a violin, spread open and joined to a hundreds of tiny threads and wheels, as if awaiting a surgeon. She had not noticed it the last time. On the glass was a neatly typed label: JUDGED THE EIGHTH GREATEST INVENTION IN THE WORLD. CHICAGO WORLD'S FAIR. 1933. "It sounds just like a real violin. Listen." The old man took a nickel from his pocket and dropped it into the back of the machine. From deep inside she heard a sputter and a whirr. Theo bent closer to look; then all at once they heard a nervous spidery response, ping! ping! Wheels spun, silver pistons scraped the strings. The whole effect was oddly touching, as if they were watching a fading performer's comeback from senility. When its shrill and complicated heart fell silent, they all three burst into applause. "You don't know that tune, I bet," said the old man, pleased and shy. "Go out that door to the docks and take the first boat on the end. The paddles are inside." The island looked small, the way places always looked to Erica when she had known them as a child and then revisited them as an adult. Rocks scratched against the bottom of the boat, and she climbed out, bunching her skirt in her arm. Theo lifted the prow, and together they pulled the boat over the thin strip of beach toward the trees. "Come on," said Theo. "I'm going in." He vanished into a bush. Erica waded along the edge of the water. The white skeleton of a crayfish surfaced as she dug her toes into the sand. "Are you going swimming in your dress?" She could not look at him. "Somebody might come." But she knew there was nobody here but themselves. "Good Christ," shouted the bush. "Since when is your own flesh a thing to be ashamed of?" And when the voice spoke again, it was softer and more winning. "Here I am." Drawn by its strangeness, she turned. There he stood, very white and thin-legged, and oddly exotic in his nakedness, like a unicorn. "Well, I'm going into the water." He plunged forward with studied casualness, but his whole body grimaced when the water touched his waist. Then he stopped and carefully splashed his ribs and arms, humming quietly to himself. In the sunlight, his back was as round and white as a loaf of dough. Dazzled by the brightness of things, gazing about him at the mainland some distance away, he seemed to have sprung from the dark flesh of the water itself. Suddenly a whistle bleated so close to them that Erica started. "Are you coming in?" He was looking at her, over his shoulder, which prickled into gooseflesh as she watched him. The whistle hooted again, louder this time, and they both turned in alarm. A steamer, covered with tiers and tiers of children, was chugging toward them, under the green banner of the Huron Park Day Line. As the whole side of the boat broke into shouting and waving, she opened her mouth to speak, but Theo was already lumbering toward the woods, the water weighing him down like a heavy garment. "Jesus!" Now it was passing them, slowly and steadily, but she could see the children jumping up and down, and she could hear the way they called her, _Hey lady, hey lady!_ not because they knew her but because they did not know her. She shaded her eyes and waved, like one who has been working and glances up to see something amazing, a unicorn in the bush, a caravan of pilgrims on the road, a shipload of souls, rollicking and rolling into the new world. ## Sinner, Don't You Waste That Sunday Through the open door of the emergency room, she watched the nurse, a small black woman, caught like a moth in the light that dangled over her desk. Far down the dingy corridor, a man was singing: "We are poor little lambs that have lost our way. Baaa, baaa, baaa!" Erica lay motionless on the stretcher, longing for the fresh air of the summer night, and as she listened, she saw the sheep wandering among the huge pipes in the boiler room—every basement had a boiler room—and a surge of pity for all lost creatures brought tears to her eyes. Who was the last person to lie on this stretcher? Cupboards hung open above the dirty towels heaped on the floor; bottles of rosy fluid peopled the table and the sink. The singing stopped; the singer came into the room. He was a small man with dark graying hair and a pointed beard. In spite of his green gown and surgeon's cap, he still looked to Erica like a magician, and when he laid his hands across her swollen belly he seemed about to counter her fear with a runic spell. "I should say the child weighs close to five pounds. If you woke up at three, you've probably lost about two cups of blood. Where's your husband?" "Theo's parking the car." "I'm sending you to the labor room. The nurse will tell him where you've gone." A young woman in green carrying a clipboard pushed the stretcher, creaky as a baggage cart, to the elevator. The doors hushed themselves closed, trapping them both in the harsh light. Overhead, in hundreds of rooms, the sick were sleeping or tossing or crying out for pain in limbs that weren't there and nerves that were. "When are you due?" "Not for six weeks yet." The girl said nothing more, but when the elevator lurched and stopped, she guided the stretcher through the doors, and turned into a small room, monastically white, furnished with a wall clock, a bed, and a nightstand which held a kidney basin. Handing Erica a shapeless white gown, she began flipping briskly through the papers on the clipboard. "Let's see—you're Doctor Sloane's patient, and he doesn't believe in prepping." She reached into the top drawer of the nightstand, pulled out a razor and a syringe, and dropped them into her pocket. "Age?" "Twenty-one and a half." Erica pulled off her dress, slipped the gown around herself and groped for the ties, but found none. "Insurance?" "I don't know. My father has some." "Husband's occupation?" Erica thought about that one, for there were any number of appropriate responses, all of them true. On Monday, Wednesday, and Friday, Theo cleans fossils for the owner of the Fur 'n Feather Pet Shop. On Tuesday and Thursday he sweeps out the cages for a nation of gerbils and myna birds. On Saturdays he makes frames at the New World Gallery for other people's paintings. "Sculpt-or," she said, very clearly. "He's studying to be a sculptor." "Student," murmured the nurse, writing it down. Erica was just settling down among the sheets, when her stomach sucked into a hard knot. The intensity of the pain astonished her. She grabbed for the kidney basin, held it cool against her cheek, and threw up. How they anticipated everything here, she thought. Knowing that she would grope for such a pan, they curved it to fit her cheek. Her teeth chattered as if they had muscles of their own, and her whole body quaked. Hands urged her body to turn; she felt a faint chill as the back of her gown fell open, but the needle came and went, sly as a thief. And suddenly there was no more pain, only a change of light, like a palpable anticipation of something not yet known. "Where is the way where light dwelleth? And as for darkness, where is the place thereof? Hath the rain a father? Or who hath begotten the drops of the dew?" She repeated it like a charm; it was a gift from Theo. Asking the right questions, he said, was a way of keeping your balance. The first time she came to his place he was asking questions; he'd flunked his geology midterm and was making up an exam to send Professor Leech. "Out of whose womb came the ice? And the hoaryfrost of heaven, who hath engendered it?" Circle one: | Mother Leech ---|--- | Mother Courage | Jack Frost | Admiral Byrd | YAWEH "What's YAWEH?" asked Erica. "The secret name of the living God." "If it's secret, how come you know it?" "Because I am a student of the divine alphabet." He had waved conspicuously but casually at the books that cluttered his desk. Erica had never seen so many library books in one place, except in the library. She fingered the biggest one, bound in disintegrating leather. _The All-Wise Doorkeeper, Exhibiting to all who enter, the Science of Things Above and Things Below._ A postcard fell out, typed with frightening accuracy: > You have three hundred and two books charged to your name. Please return or renew them before the end of the term. Books must be brought in to be renewed. "There's a lovely sunset going on," said Theo, "for anyone sitting on the holy mountain." Sitting on the fire escape, they could hear the bells of Saint Stanislaus and look across the vacant lot into the kitchen of Rumpus Mitchell's Hot Spot, and watch the greenhorn busboys sneaking out for a smoke among the garbage pails. Sometimes huge, fiery-haired Rumpus Mitchell would come out to meet his wife, who was always just arriving from California with Rumpus Mitchell's little boy at her side, and a little girl of uncertain origin still in her arms. The boy would lean against his father's great belly and the little girl would lie with her cheek on his shoulder while he sang, "Sinner, don't you waste that Sunday. Sinner, don't you waste that Sunday. The people keep comin' and the train done gone." When he was not outside he was inside, harassing the customers. To shy boys who brought their girls for coffee after a movie, he would say solemnly, "Who was that wild-looking chick I saw you with last night?" Erica had once seen him cut a man's necktie off with the breadknife, because he complained that the chili was too hot. The smell of chili flavored the whole block. "I suppose you're hungry," said Theo. The kitchen was cluttered with sketches of nudes and cats, and bishops turning themselves into flames. Erica was about to say yes, when she realized he was speaking to the battered orange cat that rubbed up against her legs. "See if there's some milk in the icebox for Saint Orange Guy." She opened the door and a slab of ice crashed from the freezer to the floor. On the bottom shelf, an ancient pork chop lay all alone, like a peculiar island. "There's no milk." "I wonder if Rumpus Mitchell will give me some fried liver on credit. It builds strong teeth and claws ten different ways." He opened all the cupboards and peered inside. "All the dishes are dirty. I'll have to eat out." "You could eat at our house. Mother made a meatloaf." "No, thanks. I'll run out and get a pecan ring." "A pecan ring! All you ever eat is pecan rings." "So? If I get a fresh one, it'll last all day." He walked her home. All over the city, spring touched the maples with lime-colored blossoms. "I'll pick you up at nine for the free flicks." "No, you won't. I have to finish reading _Rasselas_ by Monday for my eighteenth-century class." "So what's _Rasselas_?" "A novel. Rasselas is the prince of Abyssinia." "Jesus! What a name!" "My dad thinks _your_ name is funny." "Oh, no," said Theo. "Mine's a lovely name. It means 'the son of silk and music, the immortal one, the heavenly music maker.'" "You told me you couldn't carry a tune." Theo shook his head. "I used to play the flute in third grade during arithmetic. It was invisible. The teacher told my parents I was mad." They stood on her doorstep, unwilling to leave each other. Out of the corner of her eye, Erica saw her father walking up and down the yard, tapping the pear trees that sprayed jets of white flowers into the air. Every fall the pears caught in the lawn mower; one year he had the trees injected to stop the harvest, and the next fall they bore twice as many. He hates anything that bears fruit, said her mother, who loved the trees and the overgrown forsythia and honeysuckle that ran wild in the backyard. Her father had taught chemistry and, according to legend, wrote caustic remarks on freshman bluebooks. At seventy-four, he walked slowly, like a mechanical toy about to run down. "I'll call you," said Theo. Her mother came out of the kitchen when she saw him go. "You could have asked him for dinner. He doesn't have much money, and I don't think he eats very well." "I did ask him," said Erica. In the twilight of the dining room, crystal decanters and silver candlesticks gleamed along the sideboard. As a child Erica had laid out whole cities with them when they arrived, along with a grand piano, soon after the death of an aunt whom she had never seen. Most of her father's family she had never seen, and the little daguerreotypes didn't help much, for mildew had eaten away the image of a nose here and a shoulder there, and all the people in them were either children or brides. "I've hidden the silver under the bookcase in the attic. You won't be afraid to stay alone for a week?" "I'll be okay." "Daddy would hate to miss the train trip and the banquet. He's the oldest living graduate of Grand River High School. And the valedictorian." Her father glanced up from his ear of corn; kernels hung like tears on his cheeks. "How many in your class?" asked Erica. "Four," said her father, and sank behind the corn again. "You can always sleep over at Mrs. Elderfield's place, like you did last year, if you're scared," said her mother. It was always "Mrs. Elderfield's place," though Mr. Elderfield lived there, too. Mrs. Elderfield had a parakeet which she fed from her own lips at breakfast, holding grains of seed between her teeth. Mr. Elderfield had insomnia and wandered about the house at night in a red plaid bathrobe. At two in the morning he would go out and work on his driveway, which he was paving with bricks; the old widow who lived behind the Elderfield's told everyone he was digging a grave. "I'll be okay alone." Her mother lowered her voice. "Don't forget to lock the door. We have all those Oriental rugs in the living room; someone could just roll them up as easy as pie. Then they could walk out with the color TV; I'm sure it would fit through the back window. I stuck your diamond ring over the curtain rod. They'll never think of looking there, though it would be a whole lot safer if you wore it." "Oh, Mother, I can't. It looks like an engagement ring." How quaint! Theo had told her when she wore it with him once to a movie. Engaged to your mother. "It's a dinner ring. Everyone should have a dinner ring. I had mine made out of Grandma Schautz's diamond earrings." A comfortable silence settled over the house as the taxi pulled away. Erica went to the kitchen and squeezed herself some orange juice, drummed on the piano for awhile and tried to play a few pieces from her mother's _College Favorites_ , the only music in sight. Then, unable to postpone it any longer, she picked up her battered copy of _Rasselas_ and curled herself in front of the dark television set to read. > I cannot forbear to flatter myself, that prudence and benevolence will make marriage happy. The general folly of mankind is the cause of general complaint. What can be expected but disappointment and repentance from a choice made in the immaturity of youth, in the ardor of desire, without judgment, without foresight, without inquiry after conformity of opinions, similarity of manners, rectitude of judgment, or purity of sentiment? Someone had written in the margin: _up yours._ Erica quit reading the text and read the comments. There were two voices: that of the first owner, whose comments ran to obscenities, and that of the second owner, who had underlined all the speeches in red and crossed out the most offensive opinions of the first owner. Far away, the campus carillon chimed eight; she gave a guilty start and brought herself back to the text again. > Such is the common process of marriage. A youth and maiden, meeting by chance or brought together by artifice, exchange glances, reciprocate civilities, go home, and dream of one another. Having little to divert attention or diversify thought, they find themselves uneasy when they are apart and therefore conclude that they shall be happy. They marry, and discover what nothing but voluntary blindness before had concealed; they wear out life in altercations and charge nature with cruelty. Her mind wandered; ten minutes on half a page! She thumbed the pages yet to come and felt panicked. By the time Theo called, she had read five more. "I'm coming to pick you up for the nine o'clock show." "I can't go," she moaned. "I have a hundred pages left." "What have you been doing for the last two hours?" "Reading." A sigh breathed lightly through the receiver. "We might as well have gone to the flicks. Do you want me to come over?" She read on, listening for him, yet he did not come. At midnight, much disappointed, she locked the door, marched upstairs, kicked off her sandals and her skirt, and climbed into her mother's bed, because it was the only bed in the house with a soft decadent mattress and two purple eiderdowns. Finding her mother's book of Bible readings under the pillow, Erica pulled it out and lay there, listening to the dark till it blossomed into small cries. Then she sat up and looked out of the window. What green birds were these that pressed their masked faces against the pane? How cold we are! they pleaded, and fluttered their pale wings. Behind them, the pear blossoms were turning to snow. Kneeling on the bed, Erica unlocked the window. I told you, said her mother's voice, not to let anyone in. But suddenly the bedroom was filled with them, chirping feverishly, and already they looked larger than they had outside, and now they were flying up and down the stairs. Out! shouted Erica, clapping her hands. How had she failed to notice their fine claws and the tiny whips they wore under their wings? They poured past her and flew into the living room, caught the edges of the Oriental rugs in their beaks, rolled them up smartly, and carried them out of the window on their backs. The teapots and silver spoons under the bookcase in the attic began to rattle and hum, and the birds hustled them gaily out of the front door, which burst open at their coming. As the last birds passed her, bearing the color television set like a sedan chair between them, Erica latched the screen. That inflamed them; the whips under their wings quivered; they rushed at the door with fierce faces, some hooded in black feathers like executioners, others masked in scarlet as for a dance. Hastily, she ran to the cellar, slammed the door, and turned the key. Crouched on the top step with her hands over ears, she heard—in spite of herself—vases overturning and drawers spilling to the floor. Give some folks an inch and they'll take a mile, said her father's voice in her ear. A pale green wing slipped under the door, groping. Erica backed down the stairs and clambered up on the big laundry tubs. "Erica!" A handful of pebbles hit the window by the bed. Pulling her skirt on, she ran downstairs to let him in. Drops of rain gleamed on his hair; his face was shining. "So how are you, Ice-Maiden?" She opened her mouth to protest and burst into tears. "I thought you weren't coming." "I had to arbitrate in a domestic quarrel. Rumpus Mitchell's wife blew up and wrecked his guitar. He cut her new poncho into shreds." Theo waited for her to stop crying, then he asked, "So what happened?" "I had a bad dream." "Why, didn't I promise to come over and guard you?" She trudged upstairs with Theo behind her, rummaged through the big bureau in her mother's room, pulled out a torn sheet, and handed it to him. "Some layout!" he observed. "Purple curtains, purple bed, purple rugs—it's a regular brothel!" He thumped the bed like a buyer. "Do you want to be tucked in?" "Yes," she said. He tucked the blankets into the mattress so tightly that Erica felt as if she were being swaddled; then he sat down on the edge of the bed. "If you give me a couple of minutes, I can think of a story." Once, when she had the flu, her father had come in to tell her a story. _Once there was a little girl who took a walk through a city where everything was falling asleep. The trees curled up their leaves and slept, the dogs dropped down on the sidewalk, and soon the little girl herself fell asleep._ He never came to tell another. That night she had dreamed curious dreams and forgotten them. In the morning, she felt she'd traveled all night in that land. Now, years later, morning amazed her all over again as sunlight broke over Theo's back. She lifted her head; she could not remember where she was. The doctor was greasing her stomach and smiling at her astonishment. "We're going to hear from the unborn," he explained, holding—for her inspection—a microphone which was attached to an amplifier on the nightstand. Under the sheet she thrashed her legs. Pain ran beside her, as inseparable from her as her shadow. Ah, now she was pulling ahead, but she knew it would cut through the forest and meet her at the next bend in the road. "Give me something to make me stop hurting." "You want a spinal injection after all? It will numb you from the chest down, and you won't be able to push the baby out. Fix your eyes on one point. No, not the clock; that only makes time go slower. Forget about time." He pressed the microphone to her belly and adjusted the dials on the amplifier. Suddenly she heard a loud beating, a rhythmic thudding as from an invisible drummer, that seemed to fill the entire room and rose over the clatter of approaching wheels in the corridor. "You see, he's still alive," said the doctor quietly. She clawed her way onto the stretcher and felt herself borne down the hall with the slow majesty of a barge. Brass plaques on the walls passed her at eye level, with the discomforting solemnity of tombstones: THE GIFT OF MR. AND MRS. LEANDER RICH IN MEMORY OF HIS FATHER IN MEMORY OF DOCTOR JOSEPH O'BRIEN A GIFT OF THE FAMILY OF MR. AND MRS. JUDD CARUSO The stretcher scraped against a small plastic box, quite empty, studded with lights and dials like an electronic reliquary. The legend passed her at eye level: THIS INCUBATOR WAS DONATED— Her feet touched bottom. The heavy metal doors swung open and she entered the cool air of the delivery room, where sunlight glanced off metal and glass. "I'm giving you a shot in case I have to cut," said the doctor. "You won't feel it. If you watch in the mirror, you can see everything for yourself." A plump woman in green scrubs lifted her onto the table, set her legs into stirrups, and covered her with sheets, as if arming her for a long journey. High in front of her shone the mirror, without reflection, like a child's dream of the sun. The nurse tipped it this way and that. Suddenly it caught someone: a man holding a syringe in one hand and an oxygen mask in the other. So strong a fear gripped Erica that she twisted her head back to see him. "That's Doctor Wong, our anesthetist," said the nurse pleasantly. "We're required to have him here for emergencies." "My glasses," called Erica. "Where are they?" "Right here. I'll put them on your nose." As the blur of equipment splintered into bewildering and exact detail, the masks and gowns warned her of sinister disguises. Nothing showed her an honest face. The anesthetist waited just out of sight; she could hear him padding about behind her. "Push," urged the doctor. "One long push is worth ten short ones. Round your shoulders. Put your chin down." Closing her eyes, she gathered her strength into a noose around the pain that had so long tormented her and pulled it tight. In the silence, the doctor's scissors snipped away at her flesh as if he were fashioning her from paper. She gasped, and the nurse caught her head, and in that instant she felt something leave her and heard a faint watery cry. He lay on her stomach, warm, wet, and crowned with blood. His skin flushed purple, white curds smeared the creases of his arms and legs, his eyes were cat-slits, his enormous mouth slobbered mucus. "Into the world we come, pissing and crying," sang the doctor. A wild joy filled her; her arms moved restlessly under the sheets, trying to find their way out, but already he was clamping and cutting the cord that joined her to this secret she had carried so long, and the nurse was lifting the child up and carrying him away. "The bassinets used to be made of wood," she observed. "I like the clear plastic ones better. You can see through the sides." And then, after a pause, "I think he favors his dad." Oh, when did he happen? In her mother's bed, among the Bible verses and the purple eiderdowns? Or that night they'd walked back from the library and stopped at the park to play in the sandbox—was he created to the comfortable creak of the merry-go-round, emptied of children at that hour, pushed slowly around by the wind? Or that Sunday morning, when they rode the river curled together in the ribbed body of a canoe, while the wild flags snapped and sank under them, but rose again in their wake—did he happen then? Far off, the bells of Saint Stanislaus rang the faithful to worship. It was eleven o'clock. Her mother and father, tired from the train-ride home, were nudging into their pew at Saint John's Lutheran and waiting for the opening prayer, which her mother knew by heart. Erica could not remember when she stopped saying her prayers. She used to pray before exams, and occasionally for advice, but she never expected an answer. During services, she ticked off the hymns and responses in her head, but came alive during the music and wondered what it would be like to meet God face to face. _All flesh is grass,_ murmured the minister darkly. _The Lord have mercy on us._ Let's get married next Sunday. In the middle of a forest, said Theo. Erica rolled up her eyes. You haven't got a job. So? Behold the lilies of the field. They neither toil nor spin. We'll get jobs on a ship. We'll make love in every hotel in Europe. Then on to Asia. To Australia. There won't be a tree on this planet that doesn't know us, a stone we haven't baptized. In the shallows before them, a school of carp lifted their finned backs above the water, splashing and leaping. Though the canoe caught them in its shadow, they heard and saw nothing but their own dance. "Here's your son. Isn't he beautiful?" exclaimed the nurse. "He's a real peewee." The head poking out of the swaddling blanket was that of a tiny old man. "How much does he weigh?" "Five pounds, two ounces. He's big for a preemie. I shouldn't think he'd need the incubator." Through fear, through the craft of time and the cunning of pain she had almost lost him. The doctor, sewing her up like a turkey, had stopped singing. She saw herself leaving her inheritance for thieves to thrive on and setting out with the baby curled like a flower against her heart. "Now we must get up," buzzed a voice in her ear. "Hang on to me. Don't look at the floor." What time was it? She looked for the clock, but it was gone. The room was new; the sun stained everything in it with the rich glaze of twilight. Clinging to the nurse, she allowed herself to be eased out of bed, and the new seams in her flesh stretched and seared her. The nurse was short, with thick glasses and a little sign on her breast that read _Miss Trout_ like a nameplate on a desk. Over her shoulder, Erica saw a girl sitting up in bed, cradling a telephone receiver under her chin, and arranging a vast collection of cosmetic jars on the tray that swung from a stand across her bed. "I'm little," said the nurse, setting Erica on a chair, "but I'm strong. You got some flowers while you were asleep." She pointed: on the nightstand, between the bedpan and the kidney basin, stood a fat ceramic lamb rolling its eyes and spraying blue daisies from its head. The nurse picked up the card propped at the base, and read, "For that very special baby boy. Love, Mother." "Did Ron tell you? He has blond lashes and eyebrows," cooed the girl in a singsong voice, pinching a clamp the size of a tooth extractor on her left eyelashes. "His nose is straightening out today. It looked so smashed. There was a little problem with his shoulder. It got stuck." "Come," said the nurse. "I've made your bed." How smooth and cool the sheets felt! When the nurse bustled out of the room, Erica felt herself becoming invisible, as if she were returning from the dead and had lost her foothold among the living. The girl's conversation seemed of immense importance, a token of the awful innocence of being alive. "Today I had someone else's menu. It was lousy. Tomorrow I choose my own. Bring me a milkshake, love. A lemon one." She hung up, and the eyelash curler clattered to the floor. Only when she climbed out of bed to pick it up, did Erica notice how tiny she was, no taller than a twelve-year-old child, with a round face and a large stomach that hung over her black bikini pajama bottoms. Erica moved her legs restlessly and the girl smiled. "I'm Tina. You had the baby that came a month early, right?" "Six weeks," corrected Erica. "Six weeks! Well, better six weeks early than six weeks late. Two days over your due date, and you feel like you've been pregnant forever." She worked her way into bed again and gave a curious little sigh. "I got flowers with my first one, too. Yellow roses in a musical pram. We can't have any more; we only have two bedrooms in the trailer. Does the smell of nail polish bother you?" "No," lied Erica. "I like it." "Thank Heaven! My mother used to send my brother and me outside when she did her nails. In the winter it was awful, sitting out on the patio in our snowsuits." Outside in the parking lot, doors slammed and voices drifted up through the window. Only later when the telephone woke her, did she discover that she'd slept through the visiting hours, and Theo had come, waited outside in the hall, and gone home again. The line buzzed ominously. Her mother's voice sounded stretched and faint, as if she were speaking under water. "How's the baby?" "All right, I guess. He weighed five, two." Her mother clucked. "My first one came two months early. I even heard him cry. I suppose nowadays they could have saved him. For heaven's sake, don't forget to boil everything. I used to boil all your toys till they warped right up. What did the flowers look like?" "Blue daisies." "I told them roses. I've found a woman to help you. A trained nurse, so I'm pretty sure she's sterile." And then, a little hesitantly, "I've ordered you a sterilizer from Penney's. You didn't say anything about having one. You can't be too clean around a new baby. Minnie read in the paper that lots of people have parasites in their eyebrows. She's been washing hers every day. Just a minute. Daddy's coming." "How is he?" "About the same. He fell down again while I was going to the bathroom. One minute he's watching 'What's My Line?' and the next minute he's on the floor. I wasn't gone more than sixty seconds. 'Al,' I tell him, 'When you want to get out of your chair, call me,' but he always forgets. Sometimes I tie him in with the clothesline. Mrs. Elderfield offered to watch him while I'm in church. Last night I put the chest of drawers against his bed, and even then he got out. But when he tries to move everything, I hear him and I get up." The phone went silent, except for the sound of scraping and breathing. Then a high voice whisked over the line. "Hello." "Hello, Daddy? How does it feel to have a new grandson?" "What?" "I said you have a new grandson." "I can't hear you." "A baby!" she shouted. "What?" She gripped the receiver in despair; she could hear him listening eagerly. "I can't hear you." He sounded genuinely sad. "I'm so sorry. I just can't hear you." "Erica, how are you feeling?" exclaimed her mother's voice. "Better now." "That's nice. Oh, isn't it wonderful how once you see the baby you forget all the pain?" As Erica hung up, the nurse appeared with a tray of paper cups. "This is your sleeping pill. If your stitches bother you, you may have a pain pill also." _What time was it?_ Someone was drilling a hole in her sleep. In the darkness she raised her head off the pillow. Far away, she heard the shrill cries of the babies, like tree-frogs on a summer night. Steps drew near and a policeman strolled past the doorway, his gun gleaming on his hip. Now the cries mingled with the clatter of wheels. Tina stirred in the next bed. The nurses swept by, pushing trains of bassinets in front of them. The whole floor was a wailing corridor peopled with angels harvesting the newborn. "Anapolous?" asked the young nurse in the doorway. "Right here!" said Tina eagerly. "Svenson?" Erica raised her hand as if she were going to recite. The nurse snapped on the nightlight, rolled a bassinet against the bed, and lifted the baby into Erica's arms. His swaddling blanket held him stiff, like upholstery. "Here's his bottle. You'll be feeding him glucose and water till your milk comes in. Don't worry if he spits up. You're trying to clear the mucus out of him." Silence settled itself like a wing over the corridor. Erica took the bottle and touched it to the baby's lips, which sucked once, twice, and stopped. Behind the cat-slit eyelids, his pupils lay hidden, like agates at the mouth of a cave. _Who are you?_ For his face was as blank as a fine plaster mask, without lines, without eyebrows, without eyelashes. Veins laid their complex waterways just under the skin on the top of his head, where the soft spot pulsed in the star-shaped absence of bone. She pushed the bottle against his lips, but he slept on, his fine breath brushing her hand, and she pushed him up against her shoulder the way she had seen other women do. His head lopped forward and struck her collarbone, and he let out a quick cry, and Erica propped him in her arms and gave herself up to admiring him, till the nurse returned. "How are you coming?" "He fell asleep." "You mustn't let him fall asleep. Snap his feet. Like this." As she unbound the swaddlings, his thin legs drew away like the amorphous flesh of a sea anemone. He cracked open his eyes and his arms stroked the air slowly and tenderly, as if he were feeling for the tides that had long since pulled out, trying to find the current that would take him home. "I'll be back. See if you can get him to drink something." "Five fingers, five toes. You beautiful little thing," sang Tina, and added, glancing at Erica, "My husband was born with six toes on his left foot. A clubfoot it was. So that's the first thing I asked: How many fingers? How many toes? Isn't it funny, all the boys I dated were six feet tall, and I married a guy five foot six with a clubfoot. It was a blind date. He came for me on his motorcycle." Thunder muttered on the horizon. Outside, in hundreds of trees, squirrels were scurrying for shelter, foxes and moles were burrowing into their holes, and fawns were folding their matchstick legs under them. Erica shivered. Tina's voice was as warm as a lullaby. "My little boy asks me, Where do the birds go when it rains? Why does Daddy have to go to work? All day long, it's why, why, why." When the nurse returned, Erica put the baby in her outstretched hands and watched her tuck him back into the bassinet, where he lay like merchandise under the label above his head. BABY SVENSON. FIVE POUNDS TWO. And then, in scrolled letters below, _This is God's gift to you._ At nine the next morning, Theo peered into the room, holding a tumbler of wild honeysuckle. "I tried to come earlier, but you were asleep. And last night the corridor was chained off. The nurse said it was feeding time. Jesus, I told her, what is this, a zoo?" "Did you hand out candy hearts on Main Street?" "I tried. Nobody cares anymore these days. I did all your crazy errands." He sat down on the edge of the bed, searched his pockets, and brought forth a handful of cornflakes and a crumpled list. Erica recognized her own handwriting, but it looked strange to her, like a letter coming back because of an incomplete address. "I got the undershirts, the diapers, the fruit juice, and the Borax. Also some loose catnip so Saint Orange Guy can roll his own mice. And I brought your watch." As he slipped it on her wrist over the plastic bracelet which the hospital had put on her, she stared, fascinated, at the items and tasks she herself had numbered; they seemed steps in the irrelevant ritual of a dead faith. And the watch, ticking fast and small, so that not one hour should escape—what were those hours but a purpose laid upon things which run their course untouched by numbers and twenty-four-karat hands? The hands tell her it is eleven o'clock. Her mother is nudging into her pew. _Sinner, don't you waste that Sunday!_ Her father is home, tied to his chair, dozing in front of the television under the watchful eye of Mrs. Elderfield. In the hospital, visitors are arriving; the new mothers have put on their best nightgowns and their brightest robes, and leaning proudly on their husbands, they take their first painful, uncertain steps down the hall to the nursery, where they stand in front of the glass window and search the rows of bassinets for their child. Here is the big blonde woman who wanted a boy and just had her sixth daughter, and the black girl who had a boy and walks about in a black satin robe that fits so tightly over her protruding stomach that she seems to be carrying him still, and when Erica meets them in front of the window, they chatter like old friends about the length of labor and whether the milk is coming in, and the husbands listen, bewildered both at the intimacy and the new concerns. Theo presses his face to the glass. "What if he grew wings?" Erica looks at him, puzzled. "What do you mean, wings?" "He could be the first man on earth to be born with wings. We'd have to learn how to take care of them. We couldn't get them wet, or they'd lose their natural oils. Of course he couldn't fly right away, but we'd teach him to zip around. And we'd fold them up for him at night. 'Oh, Doctor Spock, my little boy has broken his wing, what should I do?' We'll walk him on a string, like a balloon." And then he said, very seriously, "When we're pushing eighty, he can fly us around on his back." She nods, she is beginning to understand. Distance from the world has fallen across her, as if she breathed a different air and moved in a different space; the distance that separates those who sleep at night from those who are most alive during those hours and hear the first birds calling each other awake while the sky is still dark. She sleeps with her feet curled against her belly, the way the child slept all the months she carried him, and she feels her body becoming his body, her face becoming open and small like his face. The folds in the sheet show her grotesque mouths, dwarfs playing invisible flutes, the running of foxes and the folded wings of birds flying through that forest she has not visited since her own childhood, lying awake in her crib, watching the shadows from the cars outside unleash wings and mouths and paws. And now, heavy-eyed with sleeplessness, she sees them keep watch around her bed; kindly rabbits and comfy bears, offering her their backs to ride as in the old days, before she learned to tell time. By the end of the second day, her hearing has grown sharper and her sight keener. Before the babies are rolled out of the nursery, she feels their crying like an ache in her back. Every bird, every door cries with a child's cry, and she can pick out of all those sounds under the stars the one cry which she alone can answer. Outside, plans for the rape and salvation of the earth are going forward; factories rise up, and whole cities crumble away on command. Theo is performing all those tasks she laid on him before she realized that nothing is ever finished. With the baby resting against her shoulder, she is moving backward, away from the sun. Green birds turn their masked faces east and fly ahead of her, _This way! This way! Make way for the son of silk and music, the immortal one, the heavenly music maker._ Behind the letters of the divine alphabet there is one face, just as behind every child's face lies the face of its father. How then, can she tell her loss to the young nurse who that evening wheels in only one bassinet and says, "Doctor Sloane has your little boy in the incubator so he can keep a close watch on his breathing. He'll be in to speak with you tonight." Before the nurse can stop her, she is running down the corridor in her nightgown. The incubator has been moved into the nursery. How many times have she and Theo remarked with mild interest on that delicate machine, sitting empty in the corridor? Pressing her face against the window, she sees the child's belly heaving up and down inside. He lies in the intestines of an electronic bogeyman surrounded by more tubes than she can imagine uses for. One tube is taped to his nose, another to his arm, and they alone connect him to the cold air and harsh water of the new world. His belly flutters and grows still, heaves hard and grows still, like the body of a wounded bird. So she arrives at last, and stands at the foot of the holy mountain, crying out to the Living God of Whom she has heard all her life. "What's it all worth, Lord? Our bodies tear and our hearts break. You think anybody would choose this life if they could avoid it?" But there in front of her the babies are wailing to be fed and even now, in millions of men and women all over the planet, blood is gathering and preparing once again to shape those frail bodies. The sun is crossing the sky and calling all green things to come forth, the pear trees drop their fruit, and the field sends up sumac and wild honeysuckle. All flesh is grass, cry the birds, and all flesh is beautiful. And breaking free from the flesh of their parents come the children, who have already forgiven them. ## The Life of a Famous Man HOLDING HER SUITCASE very tightly, she stood on her toes and kissed Theo's ear and let him lift their son into her arms, then turned around and realized everyone else had already boarded long ago. A long long time ago. She turned and ran past the empty check-out desk and the unguarded passenger door, and skimmed across the dark airfield to the plane, which blinked and hummed, a huge comic animal, striped black down one side like a skunk's dream of flight. How cold, how dark the air was turning! She climbed up the steps, ducked her head, and hugging the child against her, stepped into the body of the plane, somewhere near its eyes. A stewardess, in a camel's-hair mini-dress, slammed the door behind her. Inside, men and women were reading, adjusting their seats, squeezing their coats into the overhead racks. Erica worked her way down the aisle to a window seat over the wing. Nestling her suitcase under her, she buckled her safety belt, settled the sleeping child on her lap, and pressed her face to the pane of glass, very small, one vertebra among a hundred. Far away, behind a huge plate-glass window, the land people waved like observers at an aquarium. The motor rumbled alive; there was a smell of shoe polish and gasoline as the plane turned, gathered its bulk, and headed for the broad road to heaven. Ahead of them, the airstrip was lit with tiny blue lights like cornflowers, bright on the bare field. Out of the corner of her eye Erica noticed a woman tenderly fluffing her hair. That, and the curve of Anatole's cheek against her shoulder, and the hands waving on the far side of the darkness crystallized and crushed her, as suddenly the earth seemed to split in two and she felt herself torn from him, tossed high, and snuffed out, over the fiery body of the plane that carried her. She did not know what sky or what field received them. With a cry she awoke. Or was it the child who cried out? Beside her, Theo slept on. Groping for her glasses, she squinted at the clock. The hands pointed to seven; the plane left Albany at nine. The drive to the airport took two hours. "Get up!" she shouted, jumping out of bed. A heap of books crashed to the floor. Already she saw her mother's disappointed face in the lobby of the air terminal in Detroit. And her father—would he be disappointed? Theo opened one eye. "The plane will be twenty minutes late," he said, as if he had learned this in his sleep. Anatole was lying on his stomach in his crib, head up like a turtle, leaning on his elbows, babbling at the tulips she'd cut from the seed catalogues and pasted on his crib. His thin blonde hair lay in distinct lines across his scalp, like sea grass combed flat by the water. Not a hair out of place, she told Theo. Hair that only a mother could see, Theo told Erica. She laid the child on the rug and wrestled him into his new blue overalls while the cold air mottled his skin, making all the veins prickle alive underneath. Would he take care of her when she got as old as her father? She could not imagine herself as old as her father, or this child coming to see her on her eightieth birthday—a finely carved edifice toppled by a stroke. "My boon companion," said Theo, standing in the doorway, hands slouched over the waist of his Levis, "Are you almost ready?" Now she found herself once more at the passenger gate, kissing Theo's lean bristly cheek and taking Anatole from him, yet not exactly as she had dreamed it. In the dream—in all her dreams—she was younger and smaller and always alone, wearing the brown knee socks and red tarn she still wore, and the green wool cape she'd lost long ago in the Cleveland bus station. And everything was dead quiet, as if someone had forgotten to turn on the sound. "Am I crazy? I never came home for his birthday before. He has to have a stroke to get me home." Theo pulled the sleeve of his army jacket out of Anatole's mouth. "He's an old man. You don't need any other reason to go." "Maybe," she whispered, "he won't even know who I am." She found a seat next to a portly man with white hair who was gazing earnestly out of the window. The stewardess bobbed down the aisle with an armful of telephone books in Kodak-yellow plastic covers. "Would you like a magazine, sir?" He closed his beat-up paperback copy of _How to Sell Yourself_ but kept one finger at his place. "What have you got?" "We have _International Business, Business Week, International Travel_ —" Erica laughed. Cuddled on her lap, Anatole cracked open his eyes and sucked his thumb hard; there was egg, she noticed, on the cuff of his new sweater. The man looked at them both, puzzled. "I don't believe I'll take any, thank you," he said, and opened his book to a chapter near the end: Failure Is Death. "How old is he?" cooed the stewardess. "A year and a half," said Erica. "Going home for his grandpa's eightieth birthday," she added, feeling it was expected of her, and as she said it, her father sounded oddly like a legend, not merely old, but ancient. He was fifty-seven when Erica was born, yet when she was five and going to school that first fall day, he walked so fast that she could not keep up with him. Every morning, after the news, her father turned up the radio in his room so that Erica could hear Uncle Buster, who at eight-thirty turned his magic eye on boys and girls, hurrying to dress for school all over America. _This morning it looks like the boys might win! I see a little girl in Oklahoma who isn't even out of bed. Now the girls are ahead: I see a boy in Illinois who can't even tie his shoes!_ Erica did not like the magic eye and always got dressed in the closet. Several years later she thought she heard that voice when she lifted her head to look at the clock during a spelling test. _I see a little girl in Detroit who can only spell half the words._ Who, thought Erica, could that be? She herself studied every afternoon for the sheer joy of it, walking over to the chemistry building and clutching her books as she climbed the dingy stairs to her father's office. Her father sat at a desk strewn with letters, calendars, photographs, and fossils, and she breathed in the strong clean smell from the adjoining lab. On the bookcase which reached nearly to the ceiling sat a white owl, the pet of a graduate student. "Daddy, it's me." He swiveled around and smiled. "Well, you can sit here if you want to study. I was just going to finish up some work in the lab. What's this—a book on bees?" He flipped through it. "I'm earning the beekeeper's badge in Girl Scouts." "But you've never kept any bees." "I don't have to. I only have to give a report." "I didn't know you were interested in bees." She unloaded the rest of her books and pushed his papers aside. "It's the first badge in the book. I want to earn them all, alphabetically." As she read, munching on the sesame bars he kept for her in the top drawer, the radio in the lab buzzed the news. Russian troops were retreating across Poland. Outside, the maple leaves bobbed and washed and scattered the clear October sky. The sound of her father's footsteps was as comforting as a heartbeat. Now her mother said that he could not even stand up without a walker. What was a walker? When Erica called home, her mother would tie Daddy to the chair by the downstairs telephone, then run upstairs to the bedroom extension. He loved to listen in, though he never spoke much, and he couldn't hear well at all. "How's Minnie?" "Nutty as always. Ever since she moved in with us, she wants to take us to that health resort in Miami." "That would be nice." "But she wants to go by taxi, so we won't meet any hijackers. Did I tell you about her retirement dinner? The other teachers got together and gave her a bicycle." They would chatter about Anatole and about Theo's new job as a monkey-nurse for the Zoology Department and how somebody had promised to come from a big gallery and look at his new piece—a galaxy of one hundred moons cut from old fenders—and hadn't shown up, and sometimes Erica could hear Daddy breathing, and then she remembered she wanted to talk about _him._ So after awhile her mother would say loudly, "Nice talking to you, Erica. Good _bye_." Adding a low whisper, "It's not a real goodbye. Don't hang up, Erica." Then in a loud voice again, "Good _bye._ You can hang up now, Daddy." Sometime he wouldn't hang up but would linger on, hoping to hear a little more, till Aunt Minnie came and helped him to his chair in front of the television. The plane rolled forward, creaking softly, as if someone were pulling it by a string. Globes of light bubbled across Anatole's closed eyes. For an instant the machine hung back, then it gave a roar and charged. The child awoke with a cry and Erica lurched forward and grabbed him and clenched the armrest. All at once they were leaving the earth, it was angling away under them, and already the trees looked small and new. The man put away his book. "Punkins down there," he observed, wagging his head at Anatole, who stopped crying and leaned toward the window to look. Below them lay the gold tarnish of the maples and the Monopoly board of human ambition, each field as straight as if plotted there at the beginning of time. "Will you look at those trees!" he exclaimed. "Where are you from?" asked Erica. "I was born in Buffalo. Ever ride the old Wolverine that run from Buffalo to Detroit? I'm sorry to see 'em take that train off." Sun burnished the hair that shone gold on his wrists, beyond the white cuffs. Had her father looked like this when he traveled to give lectures? She always gave him socks and handkerchiefs for his birthday, and he always left them in expensive hotels all over America. And when he came home at night—it was always night when he came home—she would stand by his suitcase, which lay open on his bed, and wait to plunder the silken pockets for the miniature bars of soap stamped with Statler or Ritz. Sometimes he remembered to ask the desk clerk for matchbooks, from which he removed the matches, for he did not smoke. She had, at the height of her collection, over a hundred match covers and forty bars of soap, which she could never bring herself to use, because having forty of them was more important than being clean. And later he would bring out his slides, mostly of banquet tables where other chemistry teachers sat before water glasses and chrysanthemums. What was chemistry? She did not know. Not till she was sixteen did she understand that her father was well known to many who would never meet him. That summer, when her mother left for Corona to see Grandfather through the last months of his life, Erica kept house for her father. She cooked great pots of squash and corn, tomatoes and Brussels sprouts, as she had seen her mother do, for he ate no meat, and she learned to shop at small expensive stores for the delicacies she knew would please him—pomegranates, mangos, and avocados. Evenings she sat at his desk in the sun parlor and typed his letters, mostly to young men in India and Japan who wrote—Honorable Professor!—begging the honor of studying with him. He stood behind her chair, leafing through the day's mail and dictating replies. > Sirs, I enclose two dollars. Please renew my subscription to the letters of Nostradamus. She ended the sentence, but he did not bend over to sign. "Erica, have you ever read the letters of Nostradamus?" "Never heard of him," said Erica. "Who is he?" "A prophet. Born in the sixteenth century. There's a medium in California who gets prophecies from him. Your mother doesn't believe a word, but maybe you'd like to read through them." From the desk drawer he pulled out a package of mimeographed sheets and put them into her hand. She took them cautiously, as if they might burn her. "What does he say will happen?" "He predicts a great explosion on the West Coast, possibly an invasion." After he had turned off the lights and she lay in bed waiting for sleep, she heard the loud whisperings of his prayers from the next room, and listening hard, she caught the sound of her own name. A man's voice filled the cabin with the information that they were flying at thirty thousand feet. Yet it seemed to Erica that they were standing still, that nothing in this country was moving and nothing would ever change. Far across the shining pasture of clouds stood a farmhouse in an orchard, bleached white as in a negative, for all that showed her a dark face on earth gave her a light one here. _Fasten your seatbelts, please_ , flashed the sign over the aisle, and she tightened her grasp on Anatole, who was beginning to squirm on her lap. "There will be a twenty-minute delay," crackled the pilot's voice, "due to fog in Buffalo." But beyond the window, the sky dazzled her and hurt her eyes: a floor of clouds, inflated with light, stretched for miles in every direction. "Why is it so nice up here and so bad down there?" asked a child's voice behind her. "The weather," said a woman's voice, "is on _earth_." Two hours later they plunged into a gray rain and touched down in Detroit. From the passenger's entrance, she could see her mother standing behind the lobby railing. In her bulky plaid coat and babushka, she looked like a peasant woman around whom chic young girls eddied and vanished. How round her face looked under the pincurl bangs springing from under her scarf. Erica had worn scarves as a child, and curls—wetted every morning and spun around her mother's fingers. In the winter they always froze on the way to school and wept down the back of her dress all morning. "I'm here!" called Erica. " _Aw_ ," cooed her mother, reaching out to kiss Anatole's sweetly indifferent cheek, "what a little skeezix!" They all three collided in an awkward embrace. "You're too thin," said her mother, pulling back. "Have you been dieting again? Where's your suitcase?" "I'm carrying it. This—here." She pointed to the flight bag over her shoulder. Her mother shook her head, the way she'd shaken it the last time Erica came home, with her best taffeta dress mashed into her book bag. "How's Daddy?" "Very quiet," said her mother. They walked toward the main exit across acres of light that filled the terminal—for all its traffic—with a luminous emptiness. "I don't believe he's said three words today. I had to call off the party. Thought it might be too much for him. But he wanted to come to the airport." "You mean he's in the car?" "With Minnie. I could hardly get her to drive out here, she's so afraid of getting polluted." The cars glittered row upon row, like a vast audience waiting for the curtain to rise. What color was her father's Buick? Erica could not remember, though he had driven her in it often. He had even won a certificate from the Buick dealer for being the oldest man in the city to have driven nothing but Buicks for the last thirty years, ever since the day he stepped into his Plymouth, braked with the accelerator and flew clean through the garage, bringing down the clothesline in Mrs. Treblecock's yard. Like Superman, he walked away whole, attended by little puffs of smoke. Suddenly she recognized his slouched tweed cap and ran to open the door. "Daddy! It's me! Happy birthday!" His face looked furrowed and brown as a walnut, and his white hair lay thicker than she had ever seen it. His eyebrows were so black that she drew back with a start. Always he had enjoyed the attentions of the barber, and the ritual of lathering and shaving each morning, of plucking stray hairs from his nose, and anointing his head with oil, so that Erica had never seen any part of him growing wild. She kissed his cheek, freckled and sunken, while Anatole bobbed up and down in her arms and reached for the planes that roared overhead. "He looks pretty foxy, doesn't he?" said Aunt Minnie. She had put on her wig for this expedition, and Erica felt oddly touched. She knelt so that her son was eyeball to eyeball with her father. "This is Grandpa. Can you say Grandpa?" "Pa," said the child and stared at him. "He knows you, Daddy. He carries your picture around at home." Sitting in the backseat with Anatole on her lap, she touched his lips with her finger, but when she took it away, he went on making airplane noises and pushing his fist through the air over her father's head. "Remember Sammy Elderfield?" her mother asked suddenly. "They have a new baby. You remember Sammy from second grade?" "Not very well." She remembered a figure in a blue corduroy jacket but could not make out the face. "They had a boy. It's a shame about his ears." "What's wrong with his ears?" "He has one of Mona's and one of Sammy's. Sammy always had lovely ears. Such awful things can happen—it's a wonder people have children at all." Anatole leaned his chin on the back of the seat and his fist came to rest behind her father's collar. "Can you say Minnie?" asked Erica. "Minnie," said Anatole, peering into her purse and pulling out a blank check scribbled with wilting letters. "Can you say A?" He looked at his feet and said nothing. "Oh, Mother, I taught him through G last night, and he's forgotten everything." But when the car turned into the driveway, he said in a voice so small that Erica alone heard it: "A." At lunch, Erica could not take her eyes off her father, except to watch Anatole. Her father ate at one end of the table, silently spooning up pureed peas, and Anatole ate at the other end in Erica's old highchair, steering with a doughnut. Through the French doors she could see Aunt Minnie on the back porch in slacks and trenchcoat, rummaging among boxes and bags lined up on the sofa. Her mother shook her head. "She never sits down anymore, since she got so healthy. She eats only one meal a day, a protein drink." "A what?" "A protein drink. I'll make you one, if you like." Aunt Minnie burst through the back door, clutching half a dozen vitamins to her bosom. "I got some organic spinach at the market this morning, if anyone wants to try it." "No thanks. You got to boil up half a pound to get a tablespoon." "Where do you get all this stuff?" asked Erica. "Why, there's a health-food salesman who comes around once a week," said her mother. "A young fellow. Isn't he nice, Al?" The old man nodded, pushed aside the empty dish in front of him and reached for the stewed prunes. "His hair was beautiful," remarked Minnie. "He told us about a program, guaranteed to help you or your money back. You eat one banana mashed in protein powder for breakfast, six lecithin tablets at each meal, and kelp flakes for dinner. En-Er-Gee Proy-To power. Very spluzy stuff, seven dollars a jar." She held up a small can, labeled with Atlas fully flexed, and glanced at Erica's father, who was leaning forward and straining his arms against the edge of the table. "Think that program is making him any better, Erica?" "Daddy, stay with us for a while," pleaded her mother. "You haven't seen Erica for a year." "I'll miss the kick-off," he said sadly. Mother sighed. "Erica, you take one arm. Al, push yourself up." Though her mother helped to support him, Erica had never before raised such a dead weight. Yet it was he who taught her how to float when she was five, and his hands that let her lie on the surface of the water. _Now just let go. Don't kick._ Later, digging in the sand, she looked up and saw his belly rising far off like an island in the deep water where he floated for hours, as if he were napping in his own bed. Dragonflies paused there and flew on. In the water he took care never to disturb them; on land he took a net and caught them, and the butterflies too, so that Erica could study them and learn their names. The three of them shuffled toward the television room. Not until she had to guide him did she realize how cluttered her mother's house was. Here in the living room stood Minnie's electric organ with its earphones dangling down the side, and there by the door were the two loveseats upholstered in horsehair, dreadful to the naked thigh. And her father so hated clutter: at the reception after Minnie's first wedding, he had gone round as happily busy as a child, folding up the chairs after each guest who went for a second drink of punch. As she eased her father into his big leather chair she felt the muscles of her arms tremble. Orange light beamed through the plastic embers in the fireplace and played across her father's shoes. Her mother turned on the television and sat down beside him. "We just had the downstairs painted, to the tune of a thousand dollars. Looks nice, doesn't it?" In the old days, when Erica was at home, they didn't bother to repaint anything. When the blue paint started to chip off the bathroom floor, her mother said, "Paint me some flowers to cover it up." So Erica painted white roses around the gray patches on the stone tile, and went on to paint roses around the toilet seat as well. She'll paint on your coffin, warned Minnie. Mother had seen a flowered toilet seat—very posh, said Minnie—for twenty-four dollars, in one of the catalogues she read every evening. She had hundreds of catalogues heaped on the window ledge with her old piano music, back issues of _Fate_ , _Time_ , and the _National Geographic_ , and some beautifully bound books on the history of witchcraft, which came after her dad started tearing out coupons for free offers. No salesman called—still, you have to watch him, Mother said. "Who's playing?" asked Erica. "I don't know," said her father. It was the half-time of somebody's game. Out poured the band. Ta ra! A man in an absurd fur hat strutted out on the field, silver baton in hand, gold buttons gleaming. Behind him, the whole band was spelling out something very clever, but Erica couldn't read it. Then the camera cruelly discovered five men in business suits, puffing and twirling and squinting under their tasseled beanies. "We bring you the a- _lum_ -ni," shouted the announcer, as static from a storm far off blurred and flattened the five men into a single ruled line, zap zap into rainbow noodles, and back again. "Aren't they _won_ -der-ful?" Her father's head sank onto his chest and his eyes closed. Her mother jumped to her feet. "Al!" she shouted. "Al!" He stirred, opened his eyes, and gazed up at her. "What's the matter?" The fear slipped out of her face. "Would you like a glass of cider?" In the kitchen, her mother was calm again as she hauled the big jug out of the icebox. "I always find him like that when I go to call him for lunch. He looks sort of pathetic, doesn't he? That's a clean glass on the sink." What was dirty and what was clean? The telephone on the wall was gray with dust, and grease glazed the stovetop grill. Erica held her father's glass while her mother poured. And as the glass filled up and chilled her hand, she saw herself at all the suppertimes of her childhood. _This is WXYZ. It is time for the six o'clock news. It is time for the weather. Fair and cloudy tomorrow. Small-craft warnings for Lake Michigan._ Her father's little portable sat beside his plate and opened like a clamshell, to show the crystals lying exquisitely under a sheet of clear amber, like the works of a watch. Over her father's silence, Erica and her mother chattered, interrupting him for only the most urgent requests. _Pass_ the to _-ma-_ toes, Al, pass the to- _ma_ -toes. Because if you didn't ask, he forgot to pass, and all the dishes stopped at his end of the table, and slowly, absent-mindedly, he finished them all. He would stare at guests as they helped themselves to seconds. There's plenty more in the kitchen, Mother would say. We have a whole bushel of tomatoes. And he would glance round with an innocent smile, and only then would they realize he had not been watching them at all. His eyes were bright as a rabbit's and very sharp, yet he did not see well, and that was why last Christmas he tripped over Anatole playing on the floor and nearly knocked him into the fire. It was a real fire that year. When she was little, he carried a pince-nez for reading, and in the evening she watched it inch down the bridge of his nose toward the newspaper—plop!—and waited for him to jam it on again, and to fold up the newspaper and take out his pocket diary. "Erica, what did I do yesterday?" "It rained," said Erica, seating herself on the arm of his chair. "And it was hot." _Rain,_ he wrote, and frowned. "Did I do anything else?" "We went downtown to get your new reading glasses." Looking down his nose he wrote _new glasses._ He was pleased that he did not need glasses for driving. The voice on the car radio that warmed the dark mornings when he drove her to school—how it sparkled with news of the cold weather as she climbed out of the car one morning, knew she was late, and slammed the door on her own coat. And as the car sped into traffic, how small her fists sounded, beating on the closed windows _stop! stop!_ But her father was listening to the news and heard nothing; the light turned red and he stopped at the end of the block. Later he sat on the edge of her bed with a wooden box on his lap and lifted out dark panes of glass, which came to life as he held them to the light for her. How could that be? To stay so dark in his hand and to show her nothing, yet when held to the light, to show her a table of ripe melons, dew gleaming on the rinds, and behind them, a bough covered with white blossoms. What are they? she asked. Autochrome plates. They'll never fade, he said proudly. He put the box back on the closet shelf. She never tried to take it down herself, for fear she would drop it. Fifteen years later, as she went upstairs, she knew she wouldn't drop it now. She stood on a chair and peered at the clutter while her hands pushed aside old lampshades, broken cameras, small flowered hats, and velvet-lined boxes shaped to fit brooches long since lost; a gold pocket-watch without face or works, a pair of coppered baby shoes, an American flag, her father's bathing suit. And here was the Adams hat he'd bought after ten years of listening to Lowell Thomas—or was it Drew Pearson? He bought it because it could be rolled up, would travel well, and would probably last forever. It came in a plastic tube and looked as shapeless as a gangster's fedora, and her mother hid it in the attic, though he sighed over it for a year. Behind a half-crocheted blanket, she found the box, as heavy as if it held stones. Downstairs, she found Anatole hugging the lid of a valentine candy-box between his knees and her father slumped down in his chair, and she could hear her mother stacking the plates in the kitchen. "Daddy!" She grabbed his shoulders and shook him, and he opened his eyes, and a huge sense of relief ran through her. "See what I found, Daddy," she said. And sitting down beside him, she pulled out a square of glass and held it up to the lamp over his chair. Between her thumb and forefinger stood a dark-haired woman in a salmon-colored Chinese robe turning her back on the camera, to show the dragon embroidered there. She was massive as a caryatid, yet she seemed to hang in empty space. "Daddy, who is this?" He squinted at the image in her hand and leaned his head so close to hers that she could hear his breathing, light as a cat's; could very nearly hear his heart. "I don't know." "Well, it's a lovely picture." Suddenly Anatole scrambled up beside them. "Look, sweetpea." She pulled out another slide, held it up, and lo, ripe melons swelled deep yellow on a scarlet cloth under a bough covered with dogwood blossoms, and all were charged with the far-off presence of things in a dream. "Daddy, do you remember when you showed me that one?" He watched anxiously as she put the glass in its dark slot and it jammed against a postcard which pulled loose and fluttered to the floor. Erica bent and picked it up. Here was a house, but none that she knew. The upper window, diamond-paned, set in half-timbers, stood open to let out a queer procession of figures who seemed to be moving on a potter's wheel: the knight, the emperor, the priest, the angel, the fool; their course as fixed as the hands on the clock-face above them. She turned the card over but there was no message, only the name of the town: _Rotbenburg ob der Tauber._ "What year were you there, Daddy?" "Twilight," he answered. "But what year?" "Why, the porter met us at the dock and put our suitcases on his bicycle and took us to the east gate. A wall runs around the city. There are two gates." He paused, she reached for the card but he held it firmly. "We stayed at the Golden Hirsch. They gave us the bridal suite. From the window you could see the orchards. Everything was in blossom." Erica had not heard her father speak so much in years. Maybe never. Not to her, anyhow. And even now he seemed to be talking to himself. Anatole began to bounce the heart-lid on the floor, and her father's eyes followed it, up down, up down, like an aged hawk. "Don't throw that," he whispered. The child dropped it at once and turned stumbling out of the room. Not until she went to bed that night did Erica remember she was leaving tomorrow morning. Anatole had pushed his head into her armpit and curled up against her, sucking his thumb. How warm he felt, and how little space he took in her bed! It was the same bed she'd slept in since her fourth birthday, and the familiar skyline of clutter still rose from the top of the bureau, loaded with books, drawings, unmatching knee socks, and velvet headbands. Overhead shone the paper stars that her father had bought; they glowed in the dark. The painter worked half a day with the dictionary propped on the stepladder, open to _constellations_ — _northern hemisphere,_ because her father wanted all the stars in their proper positions. Guests who used the room complained the stars kept them awake, but Erica loved them, and Anatole stared quiet and astonished at Orion, the Big Dipper, and the Little Bear, before he fell asleep. Now the glue was turning brittle, and one by one the stars were falling. The first one fell on Theo's head the night he'd walked her home so late after a party that her mother said he might as well sleep in the spare room and go back in the morning. She heard him moving about—clothes dropping to the floor, change rolling under the bed, she closed her eyes, and all at once he was standing before her, as white and naked as a fish. "I'm Adam," he'd said, and would have said more if they had not both heard the door to her parents' bedroom opening. He vanished with a bound into the closet, and Erica, going to shut her door, found her father, naked and hairy as an ape, eyes tightly shut, shuffling down the dark hall toward the bathroom. The next morning, at breakfast, she saw a tiny star tangled in Theo's hair like a sign of grace. Anatole's breath moved her hair, and holding him close she opened her eyes wide. All those accidents, those chance meetings and matings! Extraordinary that out of each generation one had grown up and sent forth his seed, and that this seed should come forth at this time to create _this_ child and no other. And then, that each child should survive the difficult journey from the immortal darkness of its beginnings to the cold weather of the world. Someone was piling another eiderdown over them. "Mother, what time is it?" "It's two o'clock. I had to get up for Daddy. He wants to play the radio." By the time she knew she was awake, her mother was gone. Muffled voices came from her parents' bedroom, and as she listened she felt the sheet under her turn warm and damp. Lifting Anatole in her arms she stumbled out of bed. The bathroom light cut a thin swath down the hall. Somebody had fed her, nursed her, and changed her for more nights than she could imagine. And when she was as old as her father, maybe somebody would again? She propped the sleeping child on the john, struggled to unfasten the back of his pajamas, and feeling something jab her side, she saw—for the first time—the lid to the valentine box he had smuggled into bed with him. The sky was white; downstairs, Captain Kangaroo was singing to Anatole who had already escaped his bed. Erica jumped up and ran down the hall shouting, "Get up! My plane leaves at ten o'clock." Then she caught sight of her father, dressed in his best suit, perched on the edge of the bathtub, with a silver mirror in one hand and his electric razor in the other, zz-zzz-zz. Her mother was holding him up by his belt and reading the Sunday paper. "Look, Al, Doctor Drake died. Now you'll be the oldest living alum. With him around you didn't have a chance. He was a hundred and two." "Mother, my plane leaves—" "Go downstairs. I got breakfast all ready." Her father ate alone at the dining-room table—which was set as for a wedding breakfast with cut-glass goblets, brocade napkins, and the best silver—while the waffle iron steamed in the kitchen and her mother heated the maple syrup. "Mother, I don't have time for breakfast." "You can't take Anatole on the plane without breakfast. He can eat in front of the TV." "He won't eat waffles, Mother. All he'll eat are hotdogs and bananas. Where's Minnie?" "Upstairs, mixing her protein drink." "I got to pack, Mother. Don't make anything for me." Her mother pulled out the plug of the waffle iron. "Erica, let me get you that little rocking chair of yours I saved for Anatole. I got lots of stuff saved for you." "Oh, Mother, we don't need any more furniture." "I got to get rid of things." Over the hiss of water gushing into the dishpan, her voice flowed without interruption. "Minnie brought all her furniture when she moved in, and it gets so we can hardly move. That's her umbrella on the front doorknob. I read in the papers how burglars break the glass and open it from the inside. So we'll hear them knock down the umbrella. The other night I was sure I heard a man in the attic. I went right up and turned the key in the lock, and I haven't opened it since." Every leave-taking was like this, thought Erica, as she crammed her dirty underwear into the flight bag and rummaged the bedclothes for Anatole's undershirt. Her mother followed her from one task to the next. "You want a glass of cider, Erica? You want to take that silver candelabrum back with you this time? I can put it in a big box and you can check it on the plane." Standing in the front hall, ready to go: _how did I get all this stuff? I only brought one small bag._ There was a shoebox of sterling napkin rings, a shopping bag full of towels, and the candelabrum which didn't fit in any box. Her mother had powdered her face so fast that the powder lay in thick pools on her cheeks. "Al, are you still eating? Hurry up, Erica has to catch a plane. Where's Minnie?" A general sadness wrinkled across his face. How odd that she was traveling away from him instead of he from her! Always it was she who stood on the platform, holding her mother's hand—goodbye! goodbye! bring me a present!—while steam frosted the windows, and porters pushed carts on great spoked wheels, loaded with mail bags and suitcases. Standing onstage at her high school graduation and waiting for her name to be called, she could see her father in the very back row of the auditorium, and she could see the clock on the wall, and now he was putting on his jacket and moving toward the door, hurrying to catch the taxi that would take him to the train. "Wait!" she wanted to shout. "Come back! It'll only be a moment longer! Four more names and it'll be my turn!" And then, just before she heard her own name, she saw the door close behind him. "I believe I'll stay here," he said, and his voice was frail as a husk. Erica leaned over and kissed him, then picked up Anatole. "Wave bye-bye." But Anatole buried his face in her neck. "He's forgotten. I'll come home again soon, Daddy." She realized as she said it that he hadn't asked. How dark his face looked, as if a light had burned out somewhere behind his eyes. "Erica," said her mother, "Minnie is waiting in the car." The backseat was suddenly full of packages. "How do you think your dad looks?" asked Minnie, pulling on her gloves. "About the way Mother described him." "Thank heaven he eats okay. Anything you put on the table, it just goes. I left a quart of organic prune juice and a cheesecake on the table yesterday, and he finished them both." "My God," said Erica. "You know he never used to eat cheesecake." The plane was not crowded, and she found a seat for Anatole by the window; they had a whole row to themselves. The smell of the vinyl upholstery made her feel queasy, and when she had fastened Anatole into his seat, she sat back and closed her eyes. Opening them, she discovered she had come back to the little house in the orchard in the shining pasture that billowed like endless acres of fresh bread. Suddenly she wanted to walk there so much that indeed she was there, and here before her was a little station-house, weathered to pearl, and there sat her father on the platform, waiting for the train. "I brought you a present," he said. In the kindly light of this country he looked younger as he opened his briefcase and shook into her hands a dozen tiny bars of Ivory, Palmolive, and Camay, stamped with _El Camino Real._ She tucked them carefully into her purse and sat down beside him, for there was no hint of a train. No bell sounded, no leaf stirred. "When are you coming home?" "I don't know. They've taken off the train," he said and shook his head sorrowfully. "Also the tracks." "Oh Daddy, what a shame!" "I'm real sorry they took off the train. There's no way to get back home." "What station is this, Daddy? Where are we?" He looked at her, puzzled. "You mean you don't know either?" Together they rose and looked up and down for a sign. There was none. But from the east, a little man on a bicycle was pedaling toward them. "Your suitcase, sir?" "Right here," said her father, and watched anxiously as he strapped it on the handlebars. She raised her hand to shade her eyes; far off she could see the walls of the city. "Have a good trip, Daddy." "I do miss the weather," he said. "I mean, not having any." And then he added, "When are you coming back?" But before she could answer him, the plane sank into darkness, and she saw the airport twinkling beyond the window. Anatole had fallen asleep with his head on her shoulder. Hoisting him up carefully, so as not to wake him, she grabbed the candelabrum and her flight bag and eased herself into the aisle. As she walked to the passengers' entrance under the sullen sky, a fine rain was beginning to fall. She slipped her glasses into her purse, stepped through the last gate, and waited to be known. "What," cried Theo, "is that thing in your hand?" "A candleholder. My mother gave me some stuff. I checked the rest of it." "Can't you go home just once without bringing something back? Wait right here." He started to lift Anatole from her, but she shook her head, set the candelabrum at her feet and wrapped her arms around the sleeping child as if he were a life-preserver, kissing his eyes, his nose, his hair, till she realized the men at the ticket-desk were all staring at her. Nobody around her was kissing anyone; they were all scrambling for suitcases. How good he smelled! Tasted! "Look, sweetpea." And she held him up to the window as their plane turned solemnly and glided down the runway, faster and faster, then tucked up its wheels and somewhere out of sight changed into a bird and broke through the heavy clouds into morning. ## Salvage for Victory "Salvage for victory" is excerpted from Chapter 28 of _Things Invisible to See,_ a novel set during World War II in Ann Arbor, Michigan. The scene is a conversation between a child and a woman who is taking care of him. THE FIRST TIME Davy saw Ernestina, she was boiling water for tea and talking to Aunt Helen's teakettle. She was polite and persuasive. She told it the advantages of boiling; she told it about the other pots waiting to take its place. She put her hands on her hips and said, "Pot, what is your determination in this matter?" and the pot boiled. Then she poured the water into Aunt Helen's flowered china teapot and added a tiny cheesecloth bag that did not smell like Lipton's and carried the tea out to the screened-in porch. She sat down in the rocker and opened her purse, which was chock-full of khaki yarn. She was small, like his mother, but older, and her skin had the color of chestnuts fresh from the burr with the shine still on them, and her faded blue dress smelled clean and friendly as newly shelled peas. Davy drew his little stool near her chair and admired her. She did not appear to notice him, and he was much surprised when she said, "Loose tooth?" He nodded—how did she know? He could wiggle that tooth without opening his mouth just by pushing his tongue against it. "If you keep your tongue out of the hole, you'll get a gold tooth." The blue jays screamed in the arborvitae; the cat lolled in the myrtle bed below, waiting for one false move. Davy breathed deeply the strong, sweet smell of the tea. Aunt Helen never let him sit near the teapot for fear he would knock it over and scald himself; and because she had forbidden him to touch it, he longed for nothing so much as a taste of tea from that pot. He gathered his courage and blurted out, "Can I have some tea?" "Hoo! Not this tea," replied Ernestina. (Oh, would she let him try a different tea?) "This here is hog's hoof tea for my bad leg. You could bring me a cup. I don't know where your aunt keeps her cups." Eager to please, he brought her a flowered cup from the cabinet that held Helen's best china. Ernestina thanked him gravely, as if he were a grown-up, and poured herself a cup and sipped it. Then she unlaced her shoes—black, with thick heels—and eased her feet out of them and wiggled her toes in their coarse black stockings. And what was that shining in her left shoe? A white stone? "You have a stone in your shoe," said Davy, pointing it out to her, for she seemed not to notice. Ernestina nodded. "The root doctor give me that when my leg got conjured. You can hold it if you want." He picked up the stone and rubbed it between his fingers and thought he had never felt anything so old and gentle. And the rude doctor had put it into her shoe. That was a queer thing for a doctor to do. "Can I keep it?" "Nope. It come from the root doctor. My leg swole right up, and she dug under the doorstep and sure 'nough there was a conjure bag. Bones and hair and graveyard dirt." Davy stole a glance at her afflicted leg, and she saw him; he could hide nothing from her. "It do look fine, don't it?" she said. "The root doctor is a powerful healer." _Clackety clack,_ sang her needles, gathering the khaki yarn, arranging it to suit them. She held up for his inspection the front of a sweater for her oldest son. She had four sons in the army and one daughter away at college studying to be a teacher. Ernestina sent the money to keep her there, and it took a lot of money, she told him—it took practically all she earned. Her husband hadn't worked for a year; his liver was acting up. Before he got sick he wanted to join the Air Corps and be a pilot, but the Air Corps had no use for him, so he'd built a little plane of his own out of junk: broken radiators and old tires and rusty bedsprings, good scrap that the government wanted and would pay him for. He didn't tell anyone about the plane except a few kids in the neighborhood who came for rides. He had real pilot goggles for them to wear, just like his. "Where do they go?" asked Davy. "The Lord knows," said Ernestina. "The plane got no motor. But Henry keep a log book inside, with all the places." Except for the lack of a motor, the plane was very well equipped, she assured him. She herself had never been inside to see where it went or how it got there because she was deathly afraid of flying. But she had seen the log and the names of the places. And she had seen the snapshots he took of the kids in those places. The backgrounds were always blurred, or common—a wall, a field—which convinced her that travel did nothing to improve your mind and folks might just as well stay home. Now _her_ pictures were sharp; you could always tell what you were looking at. Did he want to see some of her pictures? Davy was delighted. She showed him four pictures of her sons in uniform and then a picture of her husband, radiant and cocky in goggles and pilot's cap, leaning out of a cockpit, and a creased snapshot of a young man posing under a palm tree. The young man was her brother who had died in Bataan and come back a week later and asked his girl friend for a pack of Lucky Strikes he'd left in a bureau drawer. "He came back when he was dead?" exclaimed Davy. "His ghost come back." "Did you ever see a ghost?" "Nope. But I hear 'em when the trees murmur. They 'round all the time, crowds of 'em, the bad with the bad, the good with the good. They don't mix theirselves up like living folks. And the good ones is always flying. If you feel the air from their bodies, you get well. Anything that bothers you won't bother you no more." But though she had not seen spirits herself, she knew lots of folks who had. The good spirits looked like children, or birds. But they could be any shape they wanted to. Why, she knew the brother of a man whose wife took a drink from the spring at night and drank up the springkeeper. It took the shape of a snake, and that snake used to pop its head out of her mouth and whistle. She set down her cup, and Davy crawled into her lap. "Spirits is very fond of whistling," she remarked. "They do it to get your notice. If you ask 'em what in the Lord's name they want, they go away." "If I ask one of the good spirits to bring me some springy shoes, will it bring them?" And he showed her the picture in the magazine. "Maybe," said Ernestina. "Maybe not." A week later, when Aunt Helen and his mom were at the movies and Ernestina came over "to be in the house," as his mother put it, she woke him up and carried him to the window. The tops of the pear trees were blossoming hills of light. "Full moon," said Ernestina. "You can wish on it. Show it what you want." He opened the magazine to the page, and the moonlight fell on the springy shoes, a bargain at two dollars and ninety-nine cents. "Is the moon watching us?" he asked. He loved the moon's dirty face. Not the moon, Ernestina told him. The moon was just a lamp. But the Moon Regulator, who lit the moon every night—he would see the page. And he would send Davy those springy shoes. Not tomorrow or the next day perhaps. But he would send them. You never could tell which day he would choose. She did not put Davy back to bed right away but let him stay up to see the stars. With the shortages, he was surprised to see so many. "Hoo! They's just as many as they was 'fore the war," said Ernestina. "Can they see us?" "I 'spect they can. You never know who's watching." From the solemnity of her voice, he knew these were grave matters, and he must not speak of them to anyone. And because no one had ever entrusted him with a secret before, he greatly looked forward to Ernestina's coming, and every morning he asked, "Is Ernestina coming today?" and mostly Aunt Helen would say no, but sometimes she would say yes, and then Ernestina would sip her tea (which she drank with ice in the hot weather) on the back porch, and he would sit in her lap, content to watch her hands twinkle the yarn off the needles. He had noticed that she never talked about herself to anyone but him. Only to him would she tell her troubles, and he listened politely, waiting for the squawk of blue jays, when he could turn the talk to his own liking. "Tell about the jays taking sand to the devil." "What's today?" "Wednesday." "They ain't doing it." "Tell it anyway, please." "Why you want to hear the same story over and over?" "Tell about the jays." "Well—they take a grain of sand a day till all the sand from the top of the earth is in Hell. They gonna ransom the folks down there." The jays screeched. "Tell about Hell," whispered Davy. "Never been there." "Tell about the coffins, then." "Don't know why you want to hear the same story over and over." "Tell." "Well, there's Main Hell and there's West Hell. Bad folks' souls turn to rubber coffins and bounce through reg'lar Hell to West Hell. That's the hottest part." She was fanning herself with a church program she'd found in her purse. "I wish I were freezing, don't you, Ernestina?" Ernestina shook her head no. "I b'lieve I'd rather be too hot than too cold. I can't stand the cold." And Davy, wanting to please her, said, "I can't stand it either," though just now he thought he would like it very much. Mostly she talked about hot weather and cold weather, and how in the summer the iceman overcharged her, and how in the winter the furnace broke and once all her clothes froze solid in the washtub and Henry said, "I'll get 'em out," and he chopped them free with the ax. "Chopped all my clothes to pieces," she said. Davy never knew why, one night, after grieving over her ordinary disasters, she said, "The worst cold I ever heard of was Cold Friday. A man got froze at the gate of his house with his jug of whiskey at his lips." Davy shivered. "There was a funeral, and the heat departed out of the church, and the preacher and all the families froze solid. And the preacher's dog froze on the doorstep. They stayed that way all Friday. The root doctor was a little bit of a girl, and she froze right along with the rest of 'em. But the Lord saw fit to thaw her out. And soon everybody callin' her Cold Friday, on account she's the only one made it through." Except for the regular creak of the rocker, the air held perfectly still, as if it were listening. "Lord, Lord, she be a powerful woman!" said Ernestina. "Five times she died, five times she come back. She froze and come back, she drowned and come back, her house burnt up and she fell in the fire and come back, she got the sleepy sickness and was buried alive and come back, she choked on a bone and come back." "I hear an owl," whispered Davy. "Too early for owls," said Ernestina. "I hear one." "The owl is old-time folks. She won't hurt you. Oh, she was born the year the stars fell." And he did not know if "she" meant the owl or Cold Friday. # FOUR LECTURES ON WRITING ## The Well-tempered Falsehood: The Art of Storytelling WHEN I WAS A CHILD, my older sister and I had a game that we played on the long summer afternoons when supper was still hours away and we had nothing to do. We sat in our swings, too hot to move, until one of us started the game, and then we would forget the heat, the small yard with its mosquitoes, the impending supper, everything. The game was simple. It required two people: the teller and the listener. The teller's task was to describe a place as vividly as possible. The object of the game was to convince the listener she was there. The teller had to carry on the description until the listener said, "Stop. I'm there." I do not remember all the places we visited in the course of this game, but I do remember the very last time we played it. I was the teller and the place I wished to evoke was paradise. I did not know then that the damned are generally livelier than the saved, and that even Dante and Milton had wrestled with the problem of making virtue entertaining. Emboldened by ignorance, however, I began. First of all, I filled paradise with the rich furniture of our own church. I put in the brass angels that held the candles and the stained glass windows in which old men read the Gospel to lions, dragons, and assorted penitent beasts. For how could I make paradise pleasant unless I made it comfortable? And how could I make it comfortable unless I made it familiar? So I put in the hum of the electric fan behind the pulpit and the smell of peppermint that the head usher gave off instead of sweat. I fear it was a rather tedious description, and if I were to describe paradise for you today, it would be something like spring in San Francisco. And hell would be some bone-melting heat wave in New York City. But however conventional the line I handed my sister, it was a lot more concrete than any account of the kingdom of God I'd heard in Sunday school, where heaven was treated the way my parents treated sex. Yes, it exists. Now don't ask any more questions. At the height of my telling, something unforeseen happened. My sister burst into tears. "Stop!" she cried. "I'm there!" I looked at her in astonishment. I knew she cried at weddings and funerals. But to cry at a place pieced together out of our common experience and our common language, a place that would vanish the minute I stopped talking! That passed beyond the bounds of the game altogether. I knew I could never equal that performance, and we never played the game again. The joy of being the teller stayed with me, however, and when people asked me, "What do you want to be when you grow up?" I answered, "I want to tell stories." And the people to whom I said this always remarked, "Oh, you want to work on a newspaper, do you?" I grew up thinking that if you wanted to tell stories, you had to go through the initiation rite of working on a newspaper, and that all writers had to do this before they could become proper storytellers. When I was ten, I asked my mother, "How do I get a job on a newspaper?" For it seemed sensible to get past this hurdle as quickly as possible. "You apply for the job," said my mother. "But, of course, nobody will hire you without experience." "But how can I get experience if I need experience to get a job?" "You could start your own newspaper," said my mother. "You could start it this summer." In the summer we lived in a small town on the edge of a lake. On the opposite side of the lake stood a gravel pit, which employed nearly all the men in the town. The quality of life in this town did not encourage reading. There was no library and no bookshop. There was not even a Christian Science reading room. At night people went fishing or fighting. Lying on my stomach at two in the morning, my face pressed to the bedroom window screen, I watched the man across the street drag his wife by the hair down the front steps of his house while her lover fled out the back window. I wondered how these people would like a neighborhood newspaper. I wondered if they would read it. I knew it would have to be free, as nobody in the whole town would be willing to buy it. But there was an even bigger problem than finding readers. I hadn't the faintest idea how to gather news. Census takers were badly treated in these parts, and even the Jehovah's Witnesses had learned to leave us alone. So I put the idea of a newspaper aside, until one night the lady next door dropped by for a visit. She was a large woman who made it her business to know everybody else's. She plunked herself down in our best chair to exchange gossip with my mother, who never had any but who knew how to listen to the great events of the day. What were these events? Ray Lomax was out casting for bass and hooked Mrs. Penny's baby through the ear lobe, John Snyder had been drunk five nights running, Tina O'Brien was pregnant by somebody else's husband, and so it went. These were the plain facts. Our neighbor's description of these facts would have done credit to the _New York Post._ She paused long enough to smile at my sister and me. We were sitting at the dining-room table with our paper and crayons, and we smiled back. "You like to draw?" she asked. We nodded. She did not know that we had quit drawing the minute she opened her mouth and were transcribing every word she said. Here was news enough for ten newspapers! After she left, my mother censored what could be construed as libel, and my sister copied out the news in that anonymous schoolgirl hand she saved for thank-you notes and party invitations. We ran off our first edition on the wet face of a hectograph press, and we hung twenty-five copies of the _Stoney Lake News_ in the living room to dry. The next day I went forth to deliver it. We were an instant success. There is nothing people enjoy reading about so much as themselves. To see yourself in print—it gives you a kind of status. You are worthy of notice to someone besides your mother. When I look over those newspapers now, I see the real news was not the events themselves but the people who lived them and who narrated these events to me. I heard some wild stories and I wrote them as I heard them. And I have all those people to blame for my prejudice toward fiction that is to be heard as well as read. In my mind, writing a story for a reader cannot be separated from telling a story to a listener. I still marvel at how easy it is to tell a story, as opposed to writing a story. Collecting the news in that small town, I met people who could tell stories. Stories that left you breathless with suspense. Stories that made you laugh till your stomach hurt. All my storytellers had one thing in common, however. They would have balked at writing their own words down. They would have found writing stories very nearly impossible. But telling stories was for them as simple as conversation. Many years after the _Stoney Lake News_ went the way of all pulp, I was reading _Tristam Shandy_ and I came across a statement that brought back my brief career as a journalist. "Writing," says Laurence Sterne, "when properly managed, is but a different name for conversation." And I remembered, ironically, all those men and women who told me stories and who read little and wrote nothing. The very old and the very young are natural storytellers. When you are very old, you narrate your past and it sounds like fiction. And when you are very young, you invent a past and it sounds like fact. Either way, all it takes is a listener to get you going. I still envy the ease with which my son, at the age of seven, could tell a story. He would begin with no idea and no rough draft and no plan. But at ten minutes of eight, with bedtime in view, he would start spinning his tale. If he made it very exciting, he could prolong bedtime a whole hour. The problems of dialogue and character and plot did not trouble him. He moved swiftly from one crazy episode to the next. And listening to my son, I remembered the original goal of the storyteller: to entertain. Let me say right now that there are many ways of entertaining a reader. Kafka and Joyce and Borges and Pynchon show us just how complex and diverse are the entertainments we choose. But I am dealing here with simpler fare, with the process of storytelling in a less subjective form. I am going to start with the first book that kept me up all night because I couldn't put it down. That book is _Household Tales of the Brothers Grimm._ I still go back to folk tales and fairy tales when I want to lose myself for a few hours and come back to myself refreshed. Always the same thing happens. I read perhaps two stories and resolve to read no more, for I have to do the laundry or scrub the kitchen floor. But I happen to glance at the opening sentence of a third story, and the pull is irresistible: > One day an old man and his wife were sitting in front of their poor hut, resting from their work, when a magnificent carriage drawn by four black stallions came driving up and a richly dressed gentleman stepped out.1 And now I can't put the story down until I know who the stranger is and why he has come. Or take another story, which opens not with an unfamiliar guest but with a familiar grief: > It is a long time ago now, as much as two thousand years maybe, that there was a rich man and he had a wife and she was beautiful and good, and they loved each other very much but they had no children even though they wanted some so much, the wife prayed and prayed for one both day and night, and still they did not get one.2 And with that sentence I am hooked. I know the story will tell me how she did get one. Fairy tales generally start at the point when somebody's fortunes change, for better or worse. And I know that the woman in this story will not get her child the way most of humanity gets children. Fairy tales deal with exceptional events rather than ordinary ones. And as I read on, I am not disappointed: > In front of their house was a yard and in the yard stood a juniper tree. Once, in wintertime, the woman stood under the tree and peeled herself an apple, and as she was peeling the apple she cut her finger and the blood fell onto the snow. "Ah," said the woman and sighed a deep sigh, and she looked at the blood before her and her heart ached. "If I only had a child as red as blood and as white as snow." And as she said it, it made her feel very happy, as if it was really going to happen. And so she went into the house, and a month went by, the snow was gone; and two months, and everything was green; and three months, and the flowers came up out of the ground; and four months, and all the trees in the woods sprouted and the green branches grew dense and tangled with one another and the little birds sang so that the woods echoed, and the blossoms fell from the trees; and so five months were gone, and she stood under the juniper tree and it smelled so sweet her heart leaped and she fell on her knees and was beside herself with happiness; and six months had gone by, the fruit grew round and heavy and she was very still, and seven months, and she snatched the juniper berries and ate them so greedily she became sad and ill; and so the eighth month went by, and she called her husband and cried and said, "When I die, bury me under the juniper." And she was comforted and felt happy, but when the nine months were gone, she had a child as white as snow and as red as blood and when she saw it she was so happy that she died. > > And so her husband buried her under the juniper tree and began to cry and cried very bitterly; and then for a time he cried more gently and when he had cried some more he stopped crying and more time passed and he took himself another wife.3 Now consider for a moment what a miracle of economy you have just read. In two paragraphs a year passes but is not glossed over carelessly, one character dies, another is born, and a third remarries, and the storyteller shows all this so simply yet so concretely that I think nobody could wish for more details. There is something about the process of telling a story that forces you to come right to the point. When you are writing a story, how often does the simple action seem insufficient? And how often do you feel you must analyze or explain it? But when you are telling a story, your first impulse is to create your characters through what they do. You, the author, become the invisible medium through which they live. I am, to be sure, dealing here with a kind of fiction that emphasizes a linear plot. I know there are many kinds of storytellers and many writers who write as if they were talking to us. I have already mentioned Laurence Sterne. I could also have mentioned Mark Twain. But the great books of these men were written, first of all, to be read, not just heard, and although they can be read aloud magnificently, a clear understanding of their work comes only when you have the books in your hand and can reread some chapters and compare others, and follow themes and characters over many pages. These are the pleasures of long fiction. When I speak of storytelling here, I am talking about the story as it is told to a listener. I think it is good for writers to have that experience of telling a story. In my writing classes at Vassar, I sometimes try an exercise designed to give students that experience. We make up a story together. It's rather like making a crazy quilt. You tell your episode, and when your imagination fails, you pass it on to your neighbor, who picks up where you left off. I start by giving my students a list of ten or fifteen characters, which they may use if they are desperate or which they may abandon if they wish to make up their own. The list might go something like this: man, daughter, son, grandfather, magician, devil, car salesman, banker, angel, thief. I start the story by introducing a character whose strong passion for someone or something is likely to get him into difficulty. I say, "Once upon a time there was a woman who loved cars more than anything else in the world. And one day she—" Then I pinpoint a student with my nearsighted stare and say, "Miss Smith, you take it from there." And though Miss Smith looks back at me as if she has just seen the Last Judgment, she generally finds she _can_ take it from there. Since the story is a communal affair, she isn't afraid of failure, which I think is often the underlying cause when writers can't write. And since the characters are given to her, she doesn't have that feeling so many of us have when facing a blank page: in the beginning was the void, and darkness was upon the face of the page. Most important, she has a main character whose ruling passion—in this case, a passion for cars—will create the action of the story. And thereby hangs the tale. I have found the experience of telling a story in this way gives us the rare chance to be objective narrators. For once in our lives we are not talking about ourselves. Let me go back to the woman who loved cars and remind you that characters with an obsession or a passion for something they don't have are common enough in folk tales. "The Juniper Tree," from which I quoted earlier, opens with a woman's overpowering desire to have a child. I could have picked dozens of other examples. And we all know writers far more sophisticated than the tellers of folk tales who choose to write of such characters. Take, for example, Chekhov's story, "The Man in a Shell," which deals with a character who is obsessed with isolating himself from the world around him. Chekhov describes him as follows: > There are not a few people in the world, temperamentally unsociable, who try to withdraw into a shell like a hermit crab or a snail....Why, not to go far afield, there was Belikov, a colleague of mine, a teacher of Greek, who died in our town about two months ago. You have heard of him, no doubt. The curious thing about him was that he wore rubbers, and a warm coat with an interlining, and carried an umbrella even in the finest weather. And he kept his umbrella in its cover and his watch in a gray chamois case, and when he took out his penknife to sharpen his pencil, his penknife too was in a little case; and his face seemed to be in a case too, because it was always hidden in his turned-up collar. He wore dark spectacles and a sweater, stuffed his ears with cotton-wool, and when he got into a cab always told the driver to put up the hood. In short, the man showed a constant and irrepressible inclination to keep a covering about himself...which would isolate him and protect him from outside influences. Actuality irritated him, frightened him, kept him in a state of continual agitation, and perhaps to justify his timidity, his aversion for the present, he would always laud the past and things that had never existed, and the dead languages that he taught were in effect for him the same rubbers and umbrella in which he sought concealment from real life.4 Now why choose such a character for the subject of a story? Because the story begins at the point when such a character meets someone or something that brings him out of his shell. When the man's friends conspire to marry him off, what do you think he does? I will not spoil your pleasure in reading the story by giving away the ending. I once tried to write a story about a man ruled by a passion for telling lies. I called it "The Tailor Who Told the Truth," because in the last scene, he was cured of his passion for lying, and why hold a penitent man's past failings against him forever? Descriptions of stories are always awkward, so let me quote the opening paragraph: > In Germantown, New York, on Cherry Street, there lived a tailor named Morgon Axel who, out of long habit, could not tell the truth. As a child he told small lies to put a bright surface on a drab life; as a young man he told bigger lies to get what he wanted. He got what he wanted and went on lying until now when he talked about himself, he did not know the truth from what he wanted the truth to be. The stories he told were often more plausible to him than his own life. I found the process of writing this story very different from writing about my own experience or my immediate observation of someone else's. In the first place, the tailor was born with a peculiar autonomy, a sort of arrogance, as if I hadn't created him at all. He had already selected the details about himself he wished me to know, and I found myself describing places and situations quite foreign to me. The first half of the story is set in Germany before World War I, up to World War II. I have not visited Germany for at least twenty-five years, and my impressions of Germany between these wars come primarily from the old photograph albums kept by my parents, who lived there briefly during the twenties. My ignorance did not deter the tailor, however. One night I dreamed that the tailor and I, his creator, had an awful row about the direction I wanted the story to go. I told him the plot, the action as I saw it. He told me that I had my story all wrong, it hadn't happened that way at all, and why did I insist on changing the truth? Well, he won and I wrote the story his way. Let me remind you that "The Tailor Who Told the Truth" is a written story; that is, I did not tell it out loud to a listener and write it down afterward. Though for me there is a close connection between telling and writing, they are, in the end, two different processes. But I believe that the more you tell stories, and the more you listen to stories, the more it will affect the way you write stories. How? First, you find yourself creating characters who are not just individuals but also types. I do not mean stereotypes, those unrealized abstractions on which so many stories have foundered. I mean types of people. The misanthrope. The miser. The martyr. The woman who wants a child. The man who lives in a shell. A character who is both an individual and a type is larger than life. Let us call him an archetype; he is some facet of ourselves that we have in common with the rest of humanity. Second, you find you are not dealing with individual situations but with the forces that created them. I call these forces good and evil, though I would not name them as such in a story. Stories that develop archetypal situations have the truth and the authority of proverbs, no matter how fantastic the particular events they describe. Third, you find yourself using fewer adjectives and more verbs, because verbs make the story move. You don't develop your character by describing the kind of man he is—a bad man, a good man, an indifferent man; you develop him by showing what he does. It's up to the reader to pass judgment. Fourth, you the writer become less important than the story you have to tell. And thank heaven for that. Which of us doesn't enjoy telling tall tales where we can lie outrageously without having to justify ourselves? So far, so good. But we are readers and writers, not storytellers sitting around a fire, spinning tales out of a common heritage. I suppose it's the desire to bring the two together that leads some writers to put a story into the mouth of a narrator, at one remove from the writer himself. In "The Man in the Shell," from which I quoted earlier, Chekhov uses a narrator, so that we have a story within a story. Let me suggest two reasons for using a narrator to tell your story. First, you may want a limited point of view rather than an omniscient point of view. Second, you may want the economy that a story has when it is told rather than written. Isaac Bashevis Singer once explained to an interviewer why he so often puts his story into the mouth of an old village woman instead of narrating it himself. He says: > Why I like narrators? There is a good reason for that: because when I write a story without a narrator I have to describe things, while if the narrator is a woman she can tell you many things almost in one sentence. Because in life when you sit down to tell a story you don't act like a writer. You don't describe too much. You jump, you digress and this gives to the story speed and drama... it comes out especially good when you let an old woman tell a story. In a moment she's here, and a moment she's there. And because of this you feel almost that a human being is talking to you, and you don't need the kind of description which you expect when the writer himself is telling the story.5 To illustrate Singer's point, I want to quote from the opening paragraph of one of his stories. It is called "Passions." > "When a man persists he can do things which one might think can never be done," Zalman the glazier said. "In our village, Radoszyce, there was a simple man, a village peddler, Lieb Belkes. He used to go from village to village, selling the peasant women kerchiefs, glass beads, perfume, all kinds of gilded jewelry. And he would buy from them a measure of buckwheat, a wreath of garlic, a pot of honey, a sack of flax. He never went farther than the hamlet of Byszcz, five miles from Radoszyce. He got the merchandise from a Lublin salesman, and the same man bought his wares from him. This Lieb Belkes was a common man but pious. On the Sabbath he read his wife's Yiddish Bible. He loved most to read about the land of Israel. Sometimes he would stop the cheder boys and ask, 'Which is deeper—the Jordan or the Red Sea?' 'Do apples grow in the Holy Land?' 'What language is spoken by the natives there?' The boys used to laugh at him. He looked like someone from the Holy Land himself—black eyes, a pitch-black beard, and his face was also swarthy." 6 Singer's story is a long way from "The Juniper Tree," but a number of things in that paragraph will show you that their roots grow in the same place, the archetypal obsessions of man. The opening sentence directs me to the point of the story, which, like a fable, demonstrates a simple proverb: the man who persists can do the impossible. The man who wants to go to the Holy Land will find a way to get there. Singer recognizes that a man's actions are often inseparable from the objects that make up the fabric of his life. He also knows that we cannot see or touch an abstraction. And so he gives us garlic and perfume to smell, and honey and buckwheat to taste, and jewelry and kerchiefs to please the eye, and speech to please the ear. The speech is what I call essential speech in a story; that is, I could recognize this character by his speech later on, even if Singer chose not to identify him. The opposite of essential speech is small talk, which does not directly express a man or woman's deepest needs, but which is really a way of avoiding them. Now suppose you have resolved to try writing as if you were telling a story. You are ready to simplify your style and to emphasize action and plot more than you may ever wish to do again. But there is one more problem you will have to confront, and I have saved it for the last because it is the most unsettling and, at the same time, the most exhilarating. When you tell a story, you find that without knowing how or why, you cross over easily from the natural to the supernatural as if you felt absolutely no difference between them. By supernatural, let me hasten to add, I do not mean ghosts, although ghosts of one kind or another may blow through your story and make themselves at home there. I mean the visible, tangible world released from the laws that, in ordinary experience, separate time from place. You know from your own experience that the supernatural is no farther away than your own dreams at night. I do not think there has ever been or ever will be a writer who does not draw on the healing chaos of dreams for the material of stories. Here is a world of wild and fearful happenings, which mercifully vanish when we open our eyes. But occasionally these happenings shine through our daytime lives and illuminate them. When I am writing stories, I forget that many people do not read fiction, because they believe a book that is neither truthful nor instructive is a waste of time. And fiction, they believe, is not truthful but only made up. It is not instructive but only entertaining. Though my father read stories as a child, when he became a man he put away childish things. He died at the age of ninety-two, he was nearly sixty when I was born, and I believe he read his last piece of fiction in freshman English when he was eighteen. All the years of my growing up, he read nothing of mine except an occasional poem I wrote for his birthday when I didn't have enough money to buy him my standard present of black socks. Then one day, in his ninetieth year, he picked up a book of my stories and he started to read it. To his astonishment, he found himself in that book, a character in my stories, and like all characters, a fabricated being and yet a real one. In that book I was still trying to describe paradise, but now it was not a place. It was an experience occurring in time but not bound by it. My father sat in his chair and read. He read one page for an hour. He never said a word to me, he never made a sound, and though he never cried in my presence when I was a child, now the tears were running down his face. He never said, "Stop, I'm there," the way my sister did when we played our game so many years before, but it was the same game nonetheless, and we are all players. It requires two people, the teller and the listener. The teller tells the story he has made out of bits he has seen and pieces he has heard. His telling brings these fragments together, and in that healing synthesis, he gives the wasted hours of our lives an order they don't have and a radiance that only God and the artist can perceive. We get up, we go to work, we come home dead tired, and sometimes we wonder what we are doing on this planet. And we know that in the great schemelessness of things, our own importance is a lie. Is the object of the game to tell that lie? Yes, to tell the lie. But in the telling, to make it true. #### NOTES 1. Lore Segal, trans., "The Master Thief," in _The Juniper Tree and Other Tales from Grimm,_ vol. I (New York: Farrar, Straus and Giroux, 1973), p. 113. 2. Segal, "The Juniper Tree," vol. 2, p. 314. 3. Segal, "The Juniper Tree," vol. 2, pp. 314–15. 4. Avrahm Yarmolinski, ed., _The Portable Chekhov_ (New York: Viking, 1973), pp. 355–56. 5. David M. Andersen, "Isaac Bashevis Singer: Conversations in California," _Modern Fiction Studies,_ vol. 16, 1970, p. 436. 6. _Passions and Other Stories_ (New York: Farrar, Straus and Giroux, 1975), p. 296. ## How Poetry Came into the World and Why God Doesn't Write It SEVERAL MONTHS AGO I walked into a bookshop determined not to buy a book and saw, among the remainders, a small volume called _The Lost Books of Eden._ It beckoned to me like the serpent poised at the Tree of Knowledge. I considered the price. I considered my purse. I said to myself, "Opening that book could be dangerous to my economy," and I went out. Instead of leaving the scene of temptation, I walked around the block. When the bookshop came into view, I remembered the parable: the kingdom of heaven is like unto a man seeking goodly pearls who, when he had found one pearl of great price, went and sold all that he had and bought it. Also, wisdom is better than rubies, knowledge is better than gold, etc. Nothing makes us more vulnerable to temptation than ignorance. I had to know what was in that book. Alas! When I looked for the book, it was gone. The clerk was sorry. _The Lost Books of Eden_ had just been sold. Since that time I have speculated on what it might have contained. I have nearly reconstructed the lost books of Eden in my head. My reconstruction goes light on doctrine and heavy on losses. I see myself as an insurance salesman. Adam and Eve have found their way to my office. They draw up two vinyl-covered chairs and tell me their tragedy. They have lost everything through an act of God. "Can you be more specific?" I say, shuffling through my papers for the right forms. "Exactly what did you lose?" "Eternal life," says Adam. "The roses I'd just planted in the western bower," says Eve. "My free time," says Adam. "My animals," says Eve. "Even the hummingbirds were eating out of my hand." "Poetry," says Adam. "Poetry," says Eve. "Poetry?" I exclaim. "Well, that's the first thing you've mentioned that _can_ be replaced. There's plenty of poetry outside of Eden." "But it's not the same here as it was there," says Adam. "Poetry was invented in Eden. There was a well in the garden. Any time you put your ear to it, you heard a poem. Anytime you drank from it, you spoke poems. Poetry was so easy. No waiting, no revising, no dry spells." "Where does the Bible tell how God invented poetry?" I ask. "God didn't invent it," says Adam. "I did." "I did too," says Eve. "Remember me?" "Where does it say so in the Bible?" I demand. "In the books that were lost," says Adam. "The lost books of Eden. You don't believe me?" "I don't know what to believe," I answer. "Look, pretend you're in Eden," says Eve. "God has just spent six days inventing the animals and the birds and the plants, and He's exhausted. He hasn't invented poems; there are some things only humans can make. Unless you want to call the sun and the moon and the birds and the beasts God's poems. Unless you want to call Adam His first reader. The one who's entertained and instructed." "When God made me in His own image, He made me a creator too," says Adam. "And let me tell you, this creation business interested me a good deal. Especially after God let me name everything. The plants weren't too hard, except there were so many of them. I'd look at a plant and say the first sound that came into my head. And that sound would write itself in letters of gold on the air. Sycamore. Turnip. Gingko. Parsley. Later, in the cool of the evening, God stopped by to see how things were going. "'Did you name them all? You didn't forget any of my weeds?' "'Not a one,' I told him. "'Nice work, Adam,' said God. 'Now I want you to name the animals.' "One by one, the animals filed by me and waited to see what I would call them. A low beast with pointed ears and long whiskers came by, softly, softly. I said the first sound that came into my head. "'Cat.' "And the name wrote itself on the air in letters of gold: C-A-T. "'That's what you think,' said the cat. 'That's what you call me. But it's not what I call myself.' "'What do you call yourself?' I asked. "'I am he who counteracts the powers of darkness with my electrical skin and glaring eyes,' announced the cat. "The cat's name for himself also appeared on the air in letters of gold. "'To me you're a cat,' I tell him. 'Next!' "Another small beast hopped up. A beast with long ears and a brief tail. And again I said the first sound that came into my head. "'Hare.' "The name hung in the air for a moment before it floated down to the grass. Nice, short, easy to say. "'That's my first name,' said the little beast, 'but not my last.' "'What is your last name?' "'Which one?' asked the hare. 'There's jumper and racer, there's hug-the-ground and frisky legs, there's long lugs, grass-biter, dew-hammer, race-the-wind, jig-foot—' "'Wait!' I exclaimed. "'There's creep-along, sitter-still, shake-the-heart, fern-sitter, hedge-squatter—' "The names were writing themselves in the air like crazy. "'You're _hare_ to me,' I said. "The animals took their names politely but they kept their own, and they let me know that those were their real names. At the end of the day, names sparkled in heaps on the grass; the garden was littered with them. I gathered them up and threw them in the well under the Tree of Knowledge. But they didn't sink out of sight. They stuck together, they made new names, they told each other secrets. I could see that Creation was no simple matter. "So one day I said to God, "'Show me how You made some of this stuff. That snake, for example.' "'No,' says God. 'Trade secret. I don't give away my trade secrets.' "'How about one little secret? A blade of grass, for example. Or that cat sitting in the grass.' "God considered the cat. He considered it all at once, eternally, from its alpha to its omega. "'It's a funny thing,' said God, 'but I don't thrill to it anymore. Except when you do, Adam. What good is creation if nobody enjoys it?' "'I enjoy it.' "'Tell me about it,' said God. "I thought hard. What could I tell God about the grass? I sat at the well and poked around for that word to see what happened to it. "'Grass!' I called hopefully. "To my surprise, the word _grass_ swam right up like a fish and stayed there, shimmering. I took a big drink from the well. And that evening when God came by to see how things were, I opened my mouth and the well-words rolled out. Words about the grass. > A child said _What is the grass?_ fetching it to me with full hands. > > How could I answer the child? I do not know what it is any more than he. > > I guess it must be the flag of my disposition, out of hopeful green stuff woven. Or I guess it is the handkerchief of the Lord, A scented gift and remembrancer designedly dropt, Bearing the owner's name someway in the corners, that we may see and remark, and say _Whose?_ "'Nice,' says God. 'That's awfully nice.' "'You mean the grass?' I said. "'No, the questions. They make me forget I know all the answers. Can you make them work on something else?' "And God went away. The next evening I looked around the garden and spied a tyger lounging under the Tree of Knowledge. I looked into the well. There, lazing on the surface of the water, gleamed my questions about the grass. I stirred them back down and I leaned close to the water. "'Tyger,' I said. "The word TYGER swam right up, and I took a drink from the well. And that evening God came by to see how I was doing. "'I've got some questions for you, God. Questions about the tyger.' "'Let's hear them,' says God. "So I opened my mouth and the well-words rolled out. Words about the tyger. Tyger! Tyger! burning bright in the forests of the night, What immortal hand or eye could frame thy fearful symmetry? In what distant deeps or skies Burnt the fire of thine eyes? On what wings dare he aspire? What the hand dare seize the fire? And what shoulder, and what art, Could twist the sinews of thy heart? And when thy heart began to beat, What dread hand? and what dread feet? What the hammer? what the chain? In what furnace was thy brain? What the anvil? What dread grasp Dare its deadly terrors clasp? When the stars threw down their spears, And water'd heaven with their tears, Did he smile his work to see? Did he who made the Lamb make thee? Tyger! Tyger! burning bright in the forests of the night, What immortal hand or eye, Dare frame thy fearful symmetry? "'I like it,' says God. "The tyger liked it too. Said the questions made him seem mysterious and important. For a while everything in the garden wanted me to say questions about it. I made questions about the lion and the rose and the wren and the snake and the lamb; I made questions for all of them. It was 'Little lamb who made thee' and 'Little rose who made thee,' and all the creatures in the garden were happy. And every time I said my questions to God, He nodded. "'Nice,' He'd say. "But I could see that God was getting bored. After all, didn't He make everything? Didn't He know it all from the beginning? So I decided to try something new. I'd let God ask the questions. I'd think of something and give Him a couple of clues, and I'd wrap it in images like a gift in a box. And when God guessed what I was thinking of, the box would open. "For my first gift, I'd start with the well itself. "The next evening when God came by to see how I was doing, I said, As round as an apple, As deep as a cup, And all God's horses Cannot pull it up. "'What are you talking about?' said God. "'This well,' I said. "'Say it again,' said God. "I said it again. "'Nice,' said God, and He looked all pleased. 'The way you made me see it. The way you made it part apple and part cup. The way you made it important. What do you call this thing?' "I said the first name that came into my head. "'Riddle.' "For days I went around creation riddling this and riddling that. Leaves, flowers, birds, a stone, an egg. I even riddled an egg. In marble walls as white as milk, lined with a skin as soft as silk within a fountain crystal clear a golden apple doth appear. No doors are there to this stronghold Yet thieves break and steal the gold. "I could see the hen was pleased, but God was getting a trifle bored. Enough riddles already, I thought. I'll try something else. God liked the way I made the well part apple and part cup, and He liked the way I made the egg part marble and silk, part gold and milk, and part crystal. What was the point of making Him say, 'It's an egg' or 'It's a well'? I could just give Him the part He liked: the part where I linked the egg and the well with other things. "I murmured "egg" over the well, and up swam the word. There in the depths of the well twinkled my questions about the tyger and the lamb and the lion and the rose and the snake, and they were tangled up with my riddles about the well and the egg and the stone and the leaves and the birds; you could hardly tell where one started and the other left off. The word 'egg' had got so mixed up with other words that I hardly recognized it. It looked as if a dream had rocked it for seven nights running. "Nevertheless, I took a long cool drink. "That evening when God found me in the garden, I said, "'You remember the riddle about the egg.' "'Which one?' asked God. 'Weren't there several?' "'The one where it turned into marble walls as white as milk.' "'Oh, yes,' said God. 'That was nice.' "'Well, I've got another egg for you. But you don't have to find it. You just have to believe it.' "'I'm listening,' said God. "So I opened my mouth and the well-words rolled out. In this kingdom the sun never sets; under the pale oval of the sky there seems no way in or out, and though there is a sea here there is no tide. For the egg itself is a moon glowing faintly in the galaxy of the barn, safe but for the spoon's ominous thunder, the first delicate crack of lightning.1 "'You just told me the egg is a moon and I believed you,' said God. 'I, Who made the egg and Who made the moon. It's a lie. It's like the lies angels tell.' "'What other lies are there?' I asked. "'Never mind,' said God. 'What do you call it?' "I said the first name that came into my head. "'Metaphor.' "And for a long while I was happy. But man cannot live by metaphor alone, or questions, or riddles, or even the names of things. And one evening when God stopped by the garden to see how things were going, I said, "'God, I'm depressed. I have this wonderful life in the lovely garden and I'm depressed.' "God looked at me for a long time. He looked right through me. "'You have a well-stocked mind,' He said. 'But your heart is empty. You need a helpmate.' "'Sounds good to me,' I said. 'When will it arrive?' "'Making you a helpmate isn't as simple as making a worm or a wren,' said God. 'Adam, I'm going to give you the first general anesthesia.' "And God caused me to fall into a deep sleep. And when my body was asleep, my spirit climbed out and flew straight to the well, and jumped in, and came back with all this stuff that the well had made down in the depths. Emerald winds. Tiger lilies. So now I knew how God made things. God wasn't the only one who could dream. God wasn't the only one who could invent. But He was the only one who could bring it all back. "In the first fragile moments between waking and sleeping, I thought I had brought something back, perhaps a little corner of the emerald wind, speaking in wild green syllables. What I heard on waking was neither bird nor bell nor angel, and it sounded like nothing else in Eden. I will give my love an apple without any core, I will give my love a house without any door, I will give my love a palace wherein he may be and he may unlock it without any key. "'What's that marvelous sound?' I exclaimed. "'That's singing,' said God. "How can I say what the singing was like? It was not like words rising from the well into my mouth. It was as if the well itself were singing. And hearing that sound for the first time in my life, I was—for the first time in my life—lonely. The singing changed course, the way a river does, but it did not end. O, western wind, when wilt thou blow that the small rain down may rain? Christ, that my love were in my arms and I in his bed again! "I sprang up, wide awake now. And God took my hand and said, "'Adam, meet Eve. This is your helpmate.' "She sang _lullay, lullay,_ and the birds and beasts tucked their heads under their wings and slept, and she sang Hallelujah! and everything woke up full of praise. Nobody had ever made those words before. She sang, and the words answered with rhythms of their own. One was like a heartbeat, another like a dance step. As I recognized the different rhythms, I knew that without realizing it, I'd been hearing them since the day I was born. I tried to name them, so I could ask for the ones I liked best. Iamb. Anapest. Trochee. I'd say to Eve, 'Sing me something in anapests.' "'You mean something that sounds like a stone skipping?' "Sometimes in the middle of her song she'd throw in _lullay, lullay_ or _hey nonny nonny_ or _fiddle dee dee._ And I'd look all over creation for a nonny or a dee, and finally I'd have to ask her, 'What's a fiddle? What's a dee? What's a nonny?' And she'd laugh and say, "'I don't know. It's what the well sings to itself early in the morning. Ask the well.' "Oh, when she laughed! The stars in their spheres started humming, the morning stars sang together. What were riddles and metaphors to her? She could never remember the names of the iambs and anapests. But let her draw a song around the simplest thing in the world, and I would be filled with joy. And long after I'd forgotten the tune, long after I'd forgotten the words, I could still hear the rhythm of the words, the hum they make when they dance and sing in the well. Who can explain singing? It is a bell weeping and it is a procession of butterflies chanting and it is the tender tread of an elephant walking in its sleep. And whenever I heard Eve singing, I said to myself, 'Though I have the secret names of the angels, if I have not music, I have nothing.' Whenever I made metaphors, I tried to please the ear of God as well as His eye." Adam stopped talking. It was very quiet in my office. Even the janitor had gone home. I cleared my throat and shuffled my papers and tried to remember why I'd ended up in the insurance business. The reasons eluded me, and I resolved to start looking for another job tomorrow. Eve blew her nose and wiped her eyes. "Everyone liked my singing," said Eve, "except the serpent. He'd come by in the morning and listen to me, though. There was one song he always asked for, a song I'd sing when I was off tending the roses in the western bower. I sang it so Adam would know where to find me. It is late last night the dog was speaking of you; the snipe was speaking of you in her deep marsh. It is you are the lonely bird through the woods; and that you may be without a mate until you find me. "One evening when I sang that song for the serpent, he said, "'It's nice. But something is missing. You sing everything in the same key.' "'Key?' "'Key,' said the serpent. 'Key is what locks the tune to itself and locks it into your heart. You are singing in the key of C major.' "'What other key is there?' I asked. "'Why, there are more keys for tunes than roses on that bush. When you've found all the major keys, you haven't even started to discover the noble sorrows of the minor keys. Let me sing your song in one of the minor keys and you'll see what you're missing. When I go by myself to the Well of Loneliness, I sit down and I go through my trouble; when I see the world and do not see my boy, he that has an amber shade in his hair. My heart is as black as the blackness of the sloe, or as the black coal that is on the smith's forge; or as the sole of a shoe left in white halls; it was you put that darkness over my life. You have taken the east from me; you have taken the west from me; you have taken what is before me and what is behind me; you have taken the moon, you have taken the sun from me; and my fear is great that you have taken God from me! "Well, I shivered all over when I heard how the serpent's singing changed things. It was just as if somebody had opened a door in the garden and showed us what we were going to do tomorrow and tomorrow and tomorrow, just as if we could know what only God knew, that our little garden was called out of a sea of darkness, and it could be called back to that darkness. I'd never thought much about the Void, though God had told us a little about how it was before the garden came, when darkness covered the face of the deep. "'Wise serpent, wily serpent,' I whispered, 'what is the secret of your singing?' "'Loss,' hissed the serpent. 'Change. Sorrow. You and Adam live forever in Eden. When he's gone, you don't miss him. You just misplace him.' "'And where can I get loss, change, and sorrow?' I begged. "'From the Tree of Knowledge,' replied the serpent. "'God said if we eat of that tree we shall surely die,' I said. "The serpent laughed his flat little breathy laugh. "'Did God tell you what death means?' he asked. "'He said something about falling asleep forever,' I said. 'To tell you the truth, I didn't pay very much attention.' "'Believe me, you won't fall asleep,' the serpent assured me. 'I know. I've eaten from the tree myself. You will be more alive than ever. You will savor every moment. And you will sing the song that makes your bones shiver and your spirit ache with longing.' "'But will we fall asleep forever after the song is sung?' I asked. "'Eve,' said the serpent, 'you will turn into the greatest gift the tree can offer. Your life will have a beginning and an end. Your life will be a story in the mouths of millions.' "'Story,' I repeated. It wasn't a word I knew. 'Did you find that word in the well?' "'I put it there myself,' replied the serpent. "'And what does a story look like?' I asked. "'Like me,' said the serpent. 'I am the very shape of a story. Story is the thread on which all the other words are strung. It pulls them along, it gives them a purpose in life.' "'Is it as good as singing? Is it as good as metaphor?' I asked. "'My dear little Eve, story is the river on which metaphor moves and has its being. But it can only live in the fullness of time. That's why God, who lives outside of time, can't tell stories. To Him the alpha and the omega, the once-upon-a-time and the happily-ever-after, are features on a single face. But you, Eve, shall tell stories. When you have eaten the fruit of the Tree of Knowledge, you shall know the beginning of your life but not the end of it, only that it must end. You'll tell stories whose endings will surprise you, though you are their teller and creator. The Tree of Knowledge will make you wonderfully ignorant.' "'And can I sing stories?' I asked. "'Your most beautiful stories will be those you sing,' the serpent assured me. 'And when you sing them, broken lives and broken promises will become as lovely and whole as a tear of crystal.' "'Sing me a story,' I begged the serpent. 'Sing me a story made of such healing.' "So the serpent sang, There lived a wife at Usher's Well, And a wealthy wife was she; She had three stout and stalwart sons, And sent them o'er the sea. They hadna been a week from her, A week but barely ane, When word came to the carline wife That her three sons were gane. They hadna been a week from her, A week but barely three, When word came to the carline wife That her sons she'd never see. "I wish the wind may never cease Nor fashes in the flood, Till my three sons come hame to me, In earthly flesh and blood." It fell about the Martinmass, When nights are lang and mirk, The carline wife's three sons came hame, and their hats were o' the birk. It neither grew in syke nor ditch, Nor yet in ony sheugh; But at the gates o Paradise, That birk grew fair enough. "Blow up the fire, my maidens! Bring water from the well! For a' my house shall feast this night, Since my three sons are well." And she has made to them a bed, She's made it large and wide, And she's ta'en her mantle her about, Sat down at the bed-side. Up then crew the red, red cock, And up and crew the gray; The eldest to the youngest said, "'Tis time we were away." The cock he hadna craw'd but once, And clapp'd his wings at a', When the youngest to the eldest said, "Brother, we must awa'. "The cock doth craw, the day doth daw, The channerin' worm doth chide; Gin we be mist out o' our place, A sair pain we maun bide. "Fair ye weel, my mother dear! Fareweel to barn and byre! And fare ye weel, the bonny lass That kindles my mother's fire!" "'I don't understand the story,' I said, 'but I believe it. What's it about?' "'It's about you,' said the serpent. 'The wife is you, the maids are you, the lassie by the fire is you. They're all you. When you have eaten the fruit of the Tree of Knowledge, little Eve, no story will be closed to you.' "'Give me knowledge,' I pleaded. "'What God calls knowledge I call ignorance,' said the serpent. 'What God calls ignorance, I call story. Help yourself to an apple from the tree that stands in the center of the garden.'" Silence again fell over the three of us. It would be getting dark outside the office, I thought. I don't have a window; you don't get a window till someone who has one quits or dies. "So you ate the apple, Madam, and you gave a piece to your husband, and God put you both out of the garden with nothing but your fig leaves," I said, trying to sum up the legalities of the case. "You wish to declare a total loss?" "No," said Adam, "because we didn't lose everything. When the avenging angel took us to the East Gate, just before he opened it, he turned and said to me, "'You lost eternal life. How could you be so dumb?' "'Eternal life never seemed that great,' I said humbly. 'We'd never known anything else. What I really hate to lose is that well.' "The angel looked surprised. "'Why, that's the only thing you haven't lost,' he said. 'God doesn't want the well. What use is it to God? So He's letting you take it with you.' "'Where is it?' I asked. "'The well is inside you,' replied the angel. 'Much more convenient to carry it that way. Of course it's not going to be as easy to find as it was in the garden, when you could just lean over and take a drink. Sometimes you'll forget the words you're looking for, or you'll call and the wrong ones will answer. Sometimes they'll be a long time coming. But everything the well gave you it will give you again. Or if not to you, to your children. Or your great-great-great-great-grandchildren. And since God created you in His image, you have His dream power. By the grace of dreams we may meet again, blown together by an emerald wind. And I hope you'll remember me with metaphors and make a lovely web of words about me. I hope you'll make some marvelous—what do you call it?' "I said the first word that came into my head: 'Poetry.'" #### NOTE "The Egg" is from _PM/AM: New and Selected Poems_ (Norton), by Linda Pastan. ## Telling Time ONCE UPON A TIME I received an advertisement in the mail for the complete stories of Chekhov, translated by Constance Garnett. The advertisement informed me that I would receive the first volume free, to get me hooked, and one volume every three months for three years, at the end of which I would own the complete Chekhov. Over seven hundred stories. Seven hundred stories! I thought. Chekhov was a doctor. Any writer juggling the demands of a job, a novel-in-progress, and a family will probably ask, "How did he find the time to write seven hundred stories?" After I asked the question, I realized that how Chekhov found time for writing was less important to me than how I could find it. Looking for answers, I began to keep track of how I spent my time as a writer. #### SEPTEMBER 4 I took out my notes for a new story. Mostly notes on characters. I feel as nervous starting out as if I were going to a party where I don't know anybody. Will I like these characters? Will they like me? Will they tell me their secrets? I could make an outline of the story I want to tell, but my characters don't like outlines. If I let them unfold in the writing itself, they'll reveal themselves in more interesting ways than my outline could ever have imagined for them. Getting to know your characters is like throwing a block party; you start with a few people, and suddenly the whole neighborhood shows up. I've started the story with a conversation between the two main characters, by way of introducing them. #### SEPT. 10 Today I met with my old friend and former editor at Harcourt Brace Jovanovich, Barbara Lucas, to discuss _The Firebrat,_ a fantasy novel I've almost finished. It was inspired by a painting of David Weisner's, in which a boy and a girl emerge from the New York subway to find themselves in a kingdom where fish swim through the air and houses grow on trees. The character I call the Firebrat has nothing to do with David's painting. He's a six-foot scorpion and as pleasant as poison ivy. Barbara liked the fantasy sections of the book but felt the scenes in the subway were vague. When my writing is vague, it's because I don't know enough about my subject. I need more concrete details. She also felt the character of the magician needs more work. "What does he look like?" she asked. "All you've given your reader is dialogue." I'm determined to spend an entire day riding the New York subway. #### SEPT. 16 Dinner last night with Alice and Martin Provensen. Throughout the meal a golden retriever sat by Martin's chair and rested its head on his knee, the very image of canine devotion. The Provensens' farm is my idea of what the peaceable kingdom looks like. Horses in a field, a boisterous rooster, any number of cats, a tribe of hens whom Martin has nicknamed the Thurbers, and a crotchety goose named Evil Murdoch. Martin told us that one fine fall day when the wild geese were flying and calling high overhead, Evil Murdoch was seen walking down the turnpike headed south. At dinner we talked about plans for their daughter Karen's wedding, we talked about the naming of animals, we talked about everything except the one subject I was dying to bring up: the illustrations for the new book we're doing together, _The Voyage of the Ludgate Hill._ Though I'd love to see some sketches, Alice and Martin are as secretive as alchemists about what they're working on, especially toward the author. "If you showed in your face that you didn't like what we were doing, we would find it hard to go back to the drawing board in the same spirit we left it," Martin told me once. It seems ages ago that they sent me a small volume of Robert Louis Stevenson's letters, asking if I could write a poem for them to illustrate based on a letter he wrote to Henry James in 1887. In that letter, Stevenson describes his voyage from London to New York on the good ship _Ludgate Hill._ > I... enjoyed myself more than I could have hoped on board our strange floating menagerie: stallions and monkeys and matches made up our cargo; and the vast continent of these incongruities rolled the while like a haystack; and the stallions stood hypnotized by the motion, looking through the ports at our dinner-table, and winked when the crockery was broken; and the little monkeys stared at each other in cages...; and the big monkey, Jacko, scoured about the ship and rested willingly in my arms, to the ruin of my clothing... and the other passengers, where they were not sick, looked on and laughed. Take all this picture, and make it roll till the bell shall sound unexpected notes and the fittings shall break loose in our stateroom, and you have the voyage of the _Ludgate Hill_." ( _The Letters of Robert Louis Stevenson,_ ed. Sir Sidney Colvin, New York: Charles Scribner's Sons, 1915, p. 7) #### SEPT. 25 While browsing in a secondhand shop, I came across a garden magazine intended for an audience of gardeners richer than I. Such wonderful articles telling you how to landscape your fifty acres with fountains, walls, terraces, etc. In the middle of an article on the Hellbrun palace in Salzburg, something took hold of me, some odd twist of association, and I heard one of my characters talking to herself. The most important thing for me, at this stage, is to get the voice right. The voice of whoever is telling the story. I haven't a clue as to how my story will end. But that's all right. When you set out on a journey and night covers the road, you don't conclude that the road has vanished. And how else could we discover the stars? #### OCTOBER 1 I spent the afternoon riding the New York subway. The train did not break down, an army of muggers did not set upon me with sticks, a fat man did not step on my feet, I did not get stuck in the turnstile, and the hole in my pocket did not send dimes and nickels and subway tokens spinning to the pavement. This isn't to say that nothing happened. I have always liked Rilke's description of what happens when nothing is happening: > Who can name you all, you confederates of inspiration, you who are no more than sounds or bells that cease, or wonderfully new bird-voices in the neglected woods, or shining light thrown by an opening window out into the hovering morning; or cascading water; or air; or glances. Chance glances of passers-by... behold; they beckon here, and the divine line passes over them into the eternal. ("The Young Poet," _Selected Works: Vol. I, Prose,_ Norfolk, Connecticut: New Directions, i960, pp. 60–61) I came away with nothing so grand as a divine line passing over into the eternal, but I did meet an itinerant singer who was so like my idea of the magician in _Firebrat_ that I almost thought I'd conjured him up. A starfish in his lapel, a moustache like the tusks of a walrus, fingers agleam with rings as he picked out "The Golden Vanity" on his guitar. When I set about rewriting the subway scene in my manuscript, I knew what was missing. I'd mentioned the roar of the subway but not the silence and not the far-off drip drip drip of water seeping through the walls. I'd shown the jumble of graffiti on the cars but not the bleak space across the empty platforms after the train has left. The magician in this book will look like the itinerant subway singer. #### OCT. 10 I sent _Firebrat_ to my agent, who called to say she will submit it to Random House. Back to my story. Worked on it last night and dreamed over it this morning. That twilight state between dreaming and waking is a good time for watching the story work itself out. I say watching, because it really is like watching an animal, tracking it, understanding it, and finally training it. By the harsh light of day I re-read the two pages of conversation that open the story. Now they seem to me as clumsy as the opening scene in one of those melodramas, in which the maid and the butler meet in the living room and discuss all the circumstances that have led up to the present crisis. The master has been away, the mistress is ill, the mistress's brother has gambled away the family fortune, etc. Naturally you never meet the maid and the butler again. Why should you? They're not characters, they're mouthpieces for conveying information. I spent the morning groping for a way of dramatizing the information my reader will need to get on with my story. Well, I'm not writing a newspaper article. I don't need to give all the particulars of who, what, when, and where, in the first paragraph. Isn't knowing when to withhold information one of the hard-won secrets of writing fiction? Did Stephen Crane worry about giving information when he wrote the opening sentence of "The Open Boat"? "Nobody knew the color of the sky." I want my opening sentence to let the reader know, as unobtrusively as possible, what kind of story he or she is spending time with. Realistic? Fantasy? When D. H. Lawrence opens a story with "There was a man who loved islands. He was born on one, but it didn't suit him, as there were too many other people on it, besides himself," I know right away that I'm in the presence of an extended parable. #### OCT. 14 A new building is going up in our neighborhood. The sign in front gives it a working title, "Future Home of Zimmer Brothers' Jewelry Store." Since I pass it every morning on my way to buy the paper, I've seen the foundation poured, the girders laid, the walls rising. At this stage, it looks like an empty swimming pool. Early one morning, before the regular crew had arrived, I saw a man standing at the bottom, all alone, unrolling a scroll. He was dressed like a workman with one curious exception: instead of a yellow hardhat, he wore a visored cap with silver wings and his glance rested on empty space, as if he were about to perform a miracle. Building Rome in a day. Two days later a drawing board stood on that very spot. On the drawing board lay the plans for the miracle. I felt as if I were looking at a gigantic metaphor for the way writers construct stories. I've studied the plans for my story—they're all over my desk—but I haven't seen a man in a winged cap at the heart of it all. But I'm hoping for one—or maybe a winged lady, a sort of Winged Victory—who can convert my rough draft into a miracle. Several years ago I read an article by Gail Godwin in which she suggested that having a mental picture of one's muse is very useful for overcoming writer's block. I tried it and discovered I had not one muse but two. Two sisters, one obsessively shy and the other obsessively tidy. The shy one was unavailable; she was always off walking in the woods. But the tidy one told me about her. Said she likes to sit under a certain pine tree looking for bones. An owl who lives in the tree eats dozens of mice every night, and every night he throws their bones away. A mouse's bones are no bigger than the gears in a watch. The shy sister makes whistles of them so they'll sing when she breathes through them. The tidy sister is not fond of bones. The forest is her living room, and she can't bear to have mouse bones in her living room. She cleans and prunes and edits. Sometimes I want one sister, sometimes the other. But if I have writer's block, I know it's because the tidy sister is scolding the trees for growing and the milkweed for blowing, and then I hang out a sign for her. DEAR MADAM: I APPRECIATE YOUR SERVICES BUT PLEASE DO NOT COME TILL YOU ARE CALLED. I can't have her around in the beginning when my poem or story is feeling its way into leaf and flower. Finished three pages on my story. It's about a woman whose husband keeps changing jobs. Her great desire is to live in one place long enough to put down roots. #### OCT. 16 A day of distractions. The cat has an abscessed tooth, the cold water faucet is broken in the bathroom, the light doesn't work in the cellar, and I've spent the morning on the telephone, pleading with plumbers and electricians. When I look at my manuscript, I feel I've lost the thread of the narrative. I have to resist the temptation to pile up page after page, to prove to myself that I am indeed writing. When I stop and ask myself, What is the story? I can't give myself a straight answer. There's only one cure: to put the story on the back burner and turn to something else. I've always wanted to write a poem on our local hardware store—it's such a paragon of order and completeness. Bins of nails, screws, latches for every purpose under heaven. Would that there were such a store for writers. Bins of opening lines, transitions, closing sentences—it's just a matter of finding the one that fits. When I tried to start the poem, I discovered I didn't even know the names of half the things I'd been seeing for years. I spent the afternoon at the hardware store, looking and learning. A careful examination of the commonplace is, for me, one of the best ways of keeping in touch with the man in the winged cap—or the shy sister in the forest. #### OCT. 18 Maria Modugno, my editor at Harcourt Brace Jovanovich, called to say that she is coming east. She'll stop at Alice and Martin's, pick up the illustrations for _Ludgate Hill,_ and stay the night in Poughkeepsie with us. #### OCT. 20 Eric told me a curious anecdote about an electrical engineer he knows at work, who is taking early retirement so he can devote full time to his writing. He came to writing many years ago with no background in literature at all. "All my life," he told Eric, "I saw the world so differently from the way my friends saw it that I figured I must be a little crazy." The difference had something to do with imagination and intuition, though at the time he didn't use those words to explain it. One day he picked up a copy of the _New Yorker_ in a doctor's office and read the first story. "If I'm crazy," he told himself, "the guy who wrote this story is crazy in the same way I am." He read the next story and the next with growing excitement, and on the way home from the doctor's office, he mailed his subscription to the _New Yorker_ and eagerly awaited the first issue. He read every issue from cover to cover, and one day he sat down to write a story of his own. The writing went smoothly enough, but having finished his story, he did not know how to submit it. So he called the _New Yorker_ to find out. The receptionist was amused and patient. "You put the story in an envelope," she explained, "and you include return postage. And then you wait for an answer." He waited. He waited for six months. He waited the way we have all waited. After six months, he called the magazine. The kind receptionist told him a letter was in the mail. Two days later he received the letter. The _New Yorker_ wanted to buy his story. He was ecstatic. How many people sell their first story to the _New Yorker?_ But his second and third stories did not fare so well. They came back bearing notes from Rachel MacKenzie, an editor known for her candor. "This stinks." I can't help thinking of what a friend of mine said when I congratulated him on the acceptance of his first novel. "Now I'm trying to start the second one. I thought it would be easier. Well, it's not. I'm right back in square one." #### OCT. 28 Maria Modugno arrived yesterday evening, and we arranged the artwork for _Ludgate Hill_ in the living room, on the sofa and along the walls, and then we ooh'd and ah'd. She told me that when she arrived at their studio, Alice and Martin were frowning at the page on which a lively baboon makes its first appearance. "It needs a little more blue," said Alice. Martin picked up his brush and added a single stroke. Turning to Maria, Alice gave Martin a compliment that came from forty-two years of being happily married and making fifty-six books together. "Nobody paints baboons better than Martin," said Alice. Maria spent the night on our living room sofa. At midnight a huge raccoon tried to batter his way through the cat door. At two in the morning the cat himself began playing the piano by walking up and down on the keys. I fear she will never accept our hospitality again. I finished the poem on the hardware store. _A Hardware Store as Proof of the Existence of God_ I praise the brightness of hammers pointing east like the steel woodpeckers of the future, and dozens of hinges opening brass wings, and six new rakes shyly fanning their toes, and bins of hooks glittering into bees, and a rack of wrenches like the long bones of horses, and mailboxes sowing rows of silver chapels, and a company of plungers waiting for God to claim their thin legs and walk away laughing. In a world not perfect but not bad either let there be glue, glaze, gum, and grabs, calk also, and hooks, shackles, cables, and slips, and signs so spare a child may read them, _Men_ , _Women_ , _In_ , _Out_ , _No Parking_ , _Beware the Dog._ In the right hands, they can work wonders. #### NOVEMBER 1 Something there is that doesn't love a word, and it took up residence in the word processor I'm learning—with difficulty—how to use. I had got all the way up to page nineteen of my story when the screen flashed a message, DISK ERROR. Sentences slid into gibberish, words collapsed into cuneiform. The last line I'd written began pulsing like a mad neon sign. I exited, as the expression goes, turned off the machine, and fled downstairs to make a cup of coffee. When I returned to my story, half an hour later, all but three lines were gone. Immediately I put in a new disk and wrote out as much as I could remember of what I'd lost. A few hours later, I sat down at the PC and summoned up my hastily written memories of those lost pages. Gone. I'm unspeakably depressed. #### NOV. 2 I rose at dawn and wrote out my story for the third time, and for the third time, it vanished. Eric and I spent the day trying to diagnose the problem. If machines were murderable, this one would be dead. I've gone back to the 1936 Smith Corona that I bought for twenty-four dollars in a secondhand shop. Like a faithful family retainer, it runs without complaint. Naturally I'm forced to write more slowly. But this has its advantages. When you write slowly, you give the odd associations that hang around the edges of a scene their due. It's like zipping through the countryside in a limousine that suddenly breaks down. I have to get out and walk, and that's when I discover the chicory, the wild grapevine, and the ten different species of wild grasses. To write fast enough and at the same time to write slowly enough—isn't that the paradox at the heart of the writer's dilemma about finding time? This afternoon when I was in the library, the title of an article in _The Writer's Digest_ caught my eye: "How to Write Fast." I picked up the magazine and leafed through it and found myself diverted by a list of books deemed useful for writers. _Writing the Novel: From Plot to Print_ , _How to Write While You Sleep... and Other Surprising Ways to Increase Your Writing Power_ , _How to Stop Snoring_ , _Make Your House Do the Housework_ , _How to Find Another Husband... By Someone Who Did_ , _Writing after Fifty, Waking Up Dry: How to End Bedwetting Forever._ You could buy a laminated walnut writer's block if you sent fifteen dollars to the right party. A sort of voodoo item, I guess; you could pass it on to the writer who gives you a bad review. I suppose we all want to write faster. At our backs we hear time's winged chariot, and when we try to set ourselves schedules for writing, it's because writing is work, and nobody can do this work for us. But finding time isn't enough. It must be the right kind of time, and the right kind of time is as hard to find as truffles or wild orchids. The time by which the man in the winged cap and the shy sister in the forest live—that's the kind I want. And that kind of time knows nothing about schedules. It's close to what one scholar of native American art has described as the Indian sense of time. > It teaches the great lesson of patience, and in this it commands respect... Although Indians say nothing about it, the artistic part of their culture is... created in the framework of ceremonial time—slow time... Pueblo clay can only be gathered when conditions are right and after prayers are said... While creating, they are inside time and react to an internal rhythm that cannot be talked about, but which is nevertheless there. Ceremonial time is private time. Many craft workers do not like to be observed while working, and the firing of Pueblo pottery is mostly done in secret. (Ralph T. Coe, _Lost and Found Traditions, Native American Art 1965–198_ 5, Seattle: University of Washington Press, in association with the American Federation of Arts, 1986) #### NOV. 4 My agent called to say that Random House wants to buy _Firebrat._ Janet Schulman, the editor, wants numerous revisions, and she has offered to come to Poughkeepsie so that we can discuss them. Oh, I hoped she'd think it was perfect. Sometimes I think all I want is to be praised. I hate to interrupt the story I'm doing now to tinker with a book I let go a month ago. When a book is finished, the connection between me and the characters is broken. In a year or two I'll have forgotten their names. They become like the people you meet on a trip. You send them Christmas cards till you realize you can't recall what they look like. #### NOV. 23 A good friend has just been accepted for a three-week stint at the Virginia Colony of the Arts. Concentration, a gift of time; it does wonders for your writing, he assured me. I suppose it does. But I'd miss the connection with everyday life—my son coming home at three, telling tales out of school. Like the one about the science teacher who keeps dead mice in his freezer to feed his pet boa constrictor. One day when the snake looked particularly famished, he popped a frozen mouse into the microwave. A small grey explosion followed. There are no oven-cleaning compounds on the market guaranteed to banish entrails of mouse. Stories, stories. What does a writer do? I like William Carlos Williams's answer. _I listen. This is my entire occupation._ #### DECEMBER 10 Today Janet Schulman came to Poughkeepsie and we went over the manuscript of _Firebrat._ Right off, she wanted me to change the title, and I felt like my immigrant relatives from Sweden who lost their good family name somewhere on Ellis Island. "Too many Martinsons here already," snapped an official. "From now on, your name is Hedlund." It seems that Simon and Schuster is coming out with a series of young adult books called _The Firebrats,_ about teenagers after a nuclear disaster. "How about calling it _The Quest for Firebrat_?" suggested Janet. "Quest" is a word I abhor. What if Lewis Carroll had called his book _Alice's Quest for Wonderland_? What if L. Frank Baum had called his _Dorothy's Quest for the Emerald City_? To me, "Quest" suggests a pale imitation of King Arthur, a pasteboard medieval story. So my title will have to stay. Her other suggestions were fine. The skill of a good editor never fails to amaze me—that perfect blend of severity and understanding. Janet reminds me of pleasant-faced Mrs. Bowman, who worked in the AAA office in Ann Arbor. Every summer when I was in high school our family drove from Ann Arbor, Michigan, to Albuquerque, New Mexico, where my father was teaching summer school. A week before the trip, he'd sit down with Mrs. Bowman, and with much folding and refolding of maps, they would discuss the dangers and possibilities. The cities where it was easy to get lost. The towns where you could see notable attractions. My father did not care for museums, but he was never in such a hurry that he wouldn't stop to see something advertised—usually on a hand-lettered sign in the middle of the desert—as a notable attraction. The crater left by a falling star. The rattlesnake that killed the mayor's wife in a town so small you could blink twice and miss it altogether. Never mind that the notable attractions we saw were notable to nobody else. When he left the AAA office, he carried a book of strip maps with our route carefully marked in red. Years later, sitting in on one of John Gardner's workshops at Bread Loaf, I thought of those strip maps. John was telling how he kept track of details when he worked on a long novel. Shelf paper, he said. You unwind the roll, you tape it to the four walls of your room. You divide it into chapters, leaving plenty of space between them, because you'll soon be filling those spaces with notes. You could call it a map to help you navigate the unknown waters of your novel-in-progress. But never forget that you're in charge of the terrain. After all, you invented it. If that wonderful cleaning woman you so casually introduced in chapter three keeps trying to take over the story, you just might want to change the map. Janet did have a few misgivings about the character of the magician. "Some of the details you use to describe him don't connect with anything else in the book," she remarked. I started to tell her that it was all true, I'd seen this wonderful itinerant singer in the subway—and then I stopped. Oh, I've succumbed to one of the writer's strongest temptations: the wish to include something because it really happened. How often, when I've told a student that a scene is not convincing, do I hear the indignant outcry, "But it really happened!" Whether it happened to you doesn't matter. Whether the reader believes it happened—that's what matters. Why can't I follow my own advice? #### DEC. 27 Eric and James and I spent the Christmas holidays zipping between Ann Arbor and Grosse Pointe and Toledo, visiting our mothers and other relatives. Yesterday Eric and James returned home. I'm staying in Ann Arbor over the New Year to take care of Mother. She's had what the doctor calls a series of "small strokes." Small to him, maybe, but not to her. At a stroke she's lost some of her most precious memories, and hoping to find them again, she asks the same questions over and over. _Did I have a wedding? Is my sister still alive? How did my mother die?_ When darkness falls, a nameless anxiety overtakes her. Her doctor calls it "the sundown syndrome." All night long she goes up and down the stairs, checking to see if the doors are locked, peeking into every room in the house. "Who's staying with me? Whose house is this?" she asks. "Am I alone? Did I sleep here last night?" She dreamed that somebody kidnapped her and held her for ransom. Sleep is impossible for both of us. She sleeps so lightly. Every ten minutes she comes into my room and turns on the light on the pretext of bringing me something. At two A.M. she lugged in a huge portrait of my grandfather. At three A.M. she was standing by my bed holding her college diploma. "Do you know where your diploma is?" she asked. When she finally went to bed at four, I fell asleep and dreamed that all the cars in Ann Arbor had identical bumperstickers. _It's three_ A.M. _Do you know where your diploma is?_ #### DEC. 30 After four nights of not getting to sleep before four in the morning I feel like a zombie. Sunday when I tried to wake Mother up for church, she threatened to call the humane society and report me. I was determined to get her out of the house. We made it to church in time for the closing benediction. Mother turned to me and said, "That's the shortest service I've ever heard in my life." Border's bookshop was open. We stopped to browse. I bought Troyat's biography of Chekhov to read while Mother is roaming around the house at night. Last night around three A.M. she brought me some literature left by the Jehovah's Witnesses: a magazine called _Awake_ and a book called _How to Get into Paradise._ **DEC. 31 / 86** New Year's Eve. We are watching old Cary Grant movies and the news and the weather. Over and over, the same news, the same weather. I've started reading the Chekhov biography by the flickering light of the TV and feel humbled. The description of his life in Moscow during a typhus epidemic puts my sleepless nights into perspective. > Like all doctors he was constantly on call, and he slept only a few hours a night.... Even when he could grab a bit of time from his patients, he had trouble concentrating on the blank page. An entire floor or the building where he lived was occupied by a caterer, who used it for wedding receptions, funeral dinners, and guild banquets, and the shouting, the blare of music, the tinkle of dishes never seemed to end. To Bilibin he wrote: "There is a wedding orchestra playing over my head at the moment... Some asses are getting married and stomping away like horses"; and to Leikin: "I've been so exhausted, frenzied and crazed these past two weeks that my head is spinning.... The flat is constantly full of people, noise, music.... The office is cold.... The patients keep coming...." ( _Chekhov,_ Henry Troyat, translated from the French by Michael Henry Heim, New York: E. P. Dutton, 1986, pp. 69–70) Who am I to complain about one ailing mother? #### JANUARY 3 / 87 Last night I took the train back to Poughkeepsie. As I stepped up to the ticket window to ask when my train was leaving, I was clutching the Chekhov biography. The ticket-taker looked at it and smiled. "Chekhov! Hey, you a Star Trek fan?" #### FEBRUARY 27 Tying up the newspapers for recycling, I fell to reading old Sunday magazine sections of the _New York Times._ How could I have missed the issue with the photograph of Joan Didion in her study in California? Her window faces the ocean, her desk is so vast she could tapdance on it. A room of her own, full of purpose, and space, and light. My study, which I share with my son, James, commands a fine view of Craven's funeral parlor. On a busy day, they do as many as eight funerals over there. The mourners arrive, the hearses gather them up. When the last hearse has vanished, Mrs. Craven runs outside and hangs up her laundry. When the next batch of mourners arrives, she takes it all down again. Sometimes at night an ambulance comes, its lights flashing. It is nearly midnight. Eric is working in his darkroom, and in the next room, James is reading a new Phil Dick novel; a repetitive tune—I think it's something from a tape of the "Grateful Dead"— drifts through the closed door. All this coming and going does sharpen one's sense of time. How it passes. #### MARCH 29 This afternoon—a warm Sunday, the daffodils are nodding, the tulips are sending up brilliant globes to light the shady beds of violets—this afternoon I got a call from a friend of Alice and Martin Provensen. "I wanted to tell you this before you read it in the newspaper," she said. "Martin died of a heart attack on Friday morning." I was so stunned that I hardly heard her account of how it happened. He'd stepped outside and raised his hand to hail the man who was picking up fallen brush. Was Martin greeting him? Calling for help? The next moment he collapsed. Alice had gone into town on an errand, and she returned to see the ambulance pulling out of the road that leads to their farm. She rode with Martin to the hospital. I remembered Emily Dickinson: "Because I could not stop for Death, he kindly stopped for me." What else could she do but go along for the ride, at least as far as the border? When Chekhov lay dying of tuberculosis, the doctor ordered champagne for him instead of oxygen. There will be no funeral and no memorial service. I think of Hans Christian Andersen's instructions to the friend who was composing a funeral march for him. "Most of the people who will walk after me will be children, so make the beat keep time with little steps." Eric and James and I jumped into the car, and drove to the Provensen farm. Friends had been dropping in all day. We sat around the table in the kitchen; the coffeepot was steaming, and everywhere we saw signs of Martin's life on earth. His cap and jacket hung on the hook by the door, his heart medicine stood on the kitchen shelf. Their daughter, Karen, returned from the funeral parlor. "I saw Dad," she said. "He was wearing his favorite red-checked shirt. I sat by the coffin and talked and talked. I'm so glad I could say good-bye." Alice stood up. "I should go to the funeral parlor too," she exclaimed. Martin's best friend touched her arm. "No," he said. "You said good-bye to him in the ambulance. The real Martin isn't in the funeral parlor. You know he always said he didn't believe in the body." For artists, for writers, what body is there but the body of work we leave behind? #### MARCH 30 I can't even imagine what it would be like to lose someone with whom you had done fifty-six books. Going to work every morning for Alice and Martin did not mean the separation that it does for so many couples—he leaves for one office, she for another. Day after day in the studio, the only voices they heard were each other's. When I saw the obituary for Martin in the _New York Times,_ I understood why we need poems. Facts tell us everything and nothing. I happened to mention this paradox to a gentleman who runs one of the two bookshops in our neighborhood, and he told me a story his Irish grandfather told him, a story which may be another way of saying the same thing. The god Lir created the world by speaking the names of everything in it. Because he had only half a tongue, his words were only half understood. Half of creation, therefore, remained unspoken. That's why we need poets: to sing the hidden side of things. #### APRIL 3 I've set my story aside to write an elegy for Martin. Chekhov, as always, has good advice: "When you... wish to move your readers to pity, try to be colder. It will give a kind of backdrop to... grief, make it stand out more.... Yes, be cold" (Troyat, p. 148). #### APRIL 6 Worked on the elegy. Literature from Bread Loaf is arriving. Oh, Chekhov would have enjoyed that place. He might have been talking about Bread Loaf and not the Crimea when he confessed to family and friends, "I haven't written a line...", "I'm gradually turning into a talking machine. Now that we've solved all existing problems, we've started in on problems never raised before. We talk and talk and talk; we may die of inflammation of the tongue and vocal cords" (Troyat, 97). Chekhov could have run a fine workshop, judging from the critiques he gave to writers who sent him manuscripts. How did he find time to answer them all? > You have so many modifiers that the reader has a hard time determining what deserves his attention, and it tires him out. If I write, "A man sat down on the grass," it is understandable because it is clear... But it would be hard to follow and brain-taxing were I to write, "A tall narrow-chested, red-bearded man of medium height sat down noiselessly, looking around timidly and in fright, on a patch of green grass that had been trampled by pedestrians." The brain can't grasp all that at once, and... fiction ought to be immediately... graspable. (Troyat, 223) #### APRIL 11 I finished the elegy for Martin. #### APRIL 13 As I trudged to the post office to mail the poem to the _New Yorker,_ I remembered my favorite rejection letter, written by the editors of a Chinese journal, which appeared in a London paper: > We have read your manuscript with boundless delight. If we were to publish your paper, it would be impossible for us to publish any work of a lower standard. And as it is unthinkable that in the next thousand years we shall see its equal, we are, to our regret, compelled to return your divine composition, and to beg you a thousand times to overlook our short sight and timidity. ( _The Writer's Home Companion,_ James Charlton and Lisbeth Mark, New York: Franklin Watts, 1987, p. 28) #### APRIL 25 Worked on my story. #### MAY 20 A call from Anatole Broyard at the _New York Times._ Would I review a book on Dvorak in America? The review should be eight hundred words. Chekhov's advice to a young writer who felt pressured for time seems to be meant for me. > Stop trying to meet deadlines. I do not know what your income is: if it is small, then starve, as we starved in our youth, but keep your observations for works you... write during the blissful hours of inspiration, not in one go. (Troyat, p. 71) Broyard described the book he wished to send me: _Spillville,_ by Patricia Hampl. A pilgrimage to the small town in Iowa where Dvorak spent a summer. The more he talked, the more interesting it sounded. I thought of Chekhov. I asked myself—do I have the time? I want to finish my story, and I'm going to be in Ann Arbor again at the end of May, taking care of my mother. Because he told me I have the whole month of June to write it, I said yes. #### MAY 22 The galleys I'm to review arrived, along with a fat book on Dvorak, which Broyard thought would help, and a note telling me the review is due June 3. Did I mishear the date or did he change it? I've started to work on it right away. #### MAY 23 "There are two worlds, the post office and nature," wrote Thoreau in his journal (January 3, 1853). "I know them both." Today I got a letter from a child who asked: Are you famous? Are any of your books a movie yet? I wrote back and said no to both questions. But who knows what tomorrow's mail will bring? When Random House issued a new edition of _The History of Henry Esmond_ , the editors received a letter from a Hollywood agent addressed to William Makepeace Thackeray. "In the event that you have already made a commitment to some agent for the above book, we nevertheless are impressed with your potential possibilities as a screen writer and would be interested in both your services and future stories." What a prime candidate for the dead letter office. Random House replied as follows: "Thank you for your letter.... I am now working on a new novel which I think will be a natural for pictures. I am thinking of calling the new book, _Vanity Fair_ ," ( _The Writer's Home Companion,_ pp. 66–67) #### MAY 25 A fit of gardening has thrown my back out of kilter; I can't even climb out of bed. My review is due at the end of the week. Lying on my back, I tried to write, but the ink in my pen has no imagination and refuses to flow uphill. The bed is a stagnant sea of papers, books, and cats. Oh, I should have taken Chekhov's advice. #### MAY 26 "A man may write at any time," said Samuel Johnson, "if he will set himself doggedly to it." I crept out of bed and found that by kneeling at the PC, I could write a little. Anyone seeing me would have supposed I was praying for inspiration. Well, why not kneel to write? Writers have practiced their craft and sullen art in all sorts of positions. Hemingway wrote standing up. So did Virginia Woolf and Lewis Carroll. Proust and Joyce wrote in bed. Rilke says kneeling is the right spiritual posture for an artist. > He who kneels, who gives himself wholly to kneeling, loses the measure of his surroundings... he... belongs to that world in which height is—depth—and... who could measure the depth? ( _Letters of Rainer Maria Rilke,_ Vol. II, New York: W. W. Norton Company, Inc., 1948, pp. 238–39) #### MAY 28 The review for the _Times_ is done. Mailed it off this morning. #### JUNE 1 I'm in Ann Arbor taking care of Mother. On the way back from the train station, we stopped to visit the grave of her firstborn son, who died three hours after he was born. Years later, when I was growing up, she still talked about him, calculating his age, wondering what kind of person he'd have become. "I heard him cry," she'd tell me. "I heard the doctor say he'd fit in a teacup. The nuns told me they'd baptized him." Now he lies under a small headstone in the infant section of the cemetery, in the flock of stone lambs marking the surrounding graves. That boy I was born to replace. Today Mother looks at the grave without interest. "I can't remember my wedding," she says suddenly. "Did I have a wedding?" "You did," I say. "You were married at home. You had a luncheon afterwards." Silence. "Was I a good mother? I can't remember." "You were a wonderful mother," I said. "You still are." "Wasn't I lucky to have you!" she beams. "Think of all the daughters I could have had. My mother was wonderful too," she adds proudly. Pause. "She was so good at taking away pain." I think of Emerson at seventy, stricken with what we now know was Alzheimer's, fighting his memory loss by sticking labels onto things, describing their use. The names meant nothing to him any more. The sign on his umbrella read: the thing that strangers take away. So he spent the last years of his life living among riddles he made himself. At Longfellow's funeral he murmured to a friend, "That gentleman had a sweet, beautiful soul, but I have entirely forgotten his name." Easy enough to riddle an umbrella. Not so easy to riddle a human life. The sphinx asks, and Oedipus answers. What goes on four legs in the morning, two legs at noon, and three in the evening? Last night, Mother was up till four, checking the doors and asking questions. Always the same questions, but sometimes, when the muse is with me, I hear them differently. I listen the way those Irish poets listened who wanted to speak for the dark side of creation. I have gone to bed in my old room, which still has the luminous stars that my father pasted on the ceiling so many years ago. My mother stands in the hall, her shadow falling into my room. The whole universe sparkles between us. "Where are we?" she asks. "Who's with us? Where did we come from? Will we still be here tomorrow?" ## Close Encounters of the Story Kind ONCE UPON A TIME an editor, knowing my fascination with angels, invited me to write a story about one, and I thought, "Here's an assignment after my own heart," and I said yes. Then I panicked. What did I know about angels? The first angel I saw had a chipped nose. It was blond, male, and lived in a clock, which hung in the parlor of the apartment Mrs. Lear rented in my grandmother's house in Owosso, Michigan. When the hour struck, two doors opened at the top, and a tiny platform revolved, bearing the archangel Michael from one door to the next. Such dignity, such beauty—he was a procession of one. Mrs. Lear's husband had fought in the first world war and brought it from Germany, along with a Luger and some empty shells. A local jeweler who repaired it told him that it must have once held other figures, probably Adam and Eve being driven from the garden. Time had taken the archangel's sword, the fugitives, and the tip of his holy nose. Nevertheless, when I knew the hour was preparing to strike, I would knock on Mrs. Lear's door and ask to see the angel, moving from darkness into darkness. When the novelty wore off and I no longer asked, Mrs. Lear would knock on my grandmother's apartment to announce the angel was marching and did I want to watch it? An angel marching from darkness into darkness—such an event should not go unnoticed. The second angel I saw was a picture from an old insurance calendar that my grandmother had saved long after the year was out. A young woman in a white nightgown is standing with arms outstretched over two children playing at the edge of a cliff. There is a large asterisk of apple butter on her wings, as if someone had hurled a full jar during an argument and the angel had taken a blow intended for someone else. The calendar hung in my grandfather's treatment room, where patients with rheumatism and asthma came to avail themselves of the wonders of osteopathy. Only the angel and our family knew that the treatment room had once been a pantry and the waiting room doubled as the doctor's bedroom; my grandfather unfolded the sofa at night to sleep and in the morning folded it up again before the office opened. Grandmother, who managed the renting of the other rooms, had her own quarters off the kitchen. Though I have seen many pictures of angels since these two, they seem the real ones, the standard by which all others should be measured. Two days after I'd agreed to write a book about angels, my sister Kirsten called from Ann Arbor with bad news. "Mother fell and broke her hip," she said, "so I grabbed the first plane out of Pittsburgh last night. The doctor said he wants to give her a new one." "A new hip? At eighty-seven?" "He said it's her only chance of walking. And it's manmade, so it's even better than her old one. It will last forever." "Is she conscious?" "She's right here. I'll put her on the phone." I pressed my ear to the receiver and heard nothing. "Mother? How are you feeling?" She did not answer for a long time, and when she did, she sounded far off, as if she were speaking from a different room. "Isn't it the limit I should have to go through this?" she whispered. A long silence, broken by Kirsten's voice. "I found Mother's purse. It's been missing for two months. And now we can't find her teeth. They've simply vanished for good and all." "How long will she be in the hospital?" "A week. They like to get you out early here. But we'll need round-the-clock care when she moves home." "What about bringing her to Shady Park?" I asked. "Can they keep her?" From the house she'd lived in for fifty years my mother moved to a single large room in Shady Park Manor, a convalescent home in Pittsburgh five blocks from my sister and her husband. She had a room of her own. Kirsten made sure of that. On its bare surfaces my sister put spindles of snapshots; on its white walls she hung the brass filigree frames that kept us all in line: me in my cap and gown standing beside Daddy in the cap and gown he only wore when pressed into marching at commencement; my sister in her wedding dress, rising from a swirl of lace; the grandchildren, who had long ago outgrown their school portraits; Mother's diploma from Michigan, its blue and gold ribbon faded but intact. The bureau held her lavender underwear, her nylons, her purple shoes. The closet held all ten of her best purple dresses. This was the room I saw when I arrived from New York. My classes at Vassar were finished; Kirsten and John would be gone for two weeks. The note in the kitchen laid out my duties. "Please take in the mail, water the plants in the dining room, and feed the tortoise. He only eats scraped carrots. Scraper is on sink. Please take Mother's dresses to the laundromat and wash them on DELICATE. They wash everything in hot water at the home." Every morning I walked the five blocks to Shady Park, past the Fourth Presbyterian Church and the synagogue, past the Greek restaurant, the Cafe del Sol, the Korean grocer who hangs strings of jade beads in the window among the melons. Past Eat'n Park, where families carry heaping plates from the salad bar and single men sit at the counter, drinking coffee and smoking. Past Jacov's Vegetarian Deli and Tucker's Secondhand Books. Shady Park Manor stands over all, at the top of a steep hill. I hurry through the lobby, beautifully decorated in silver and blue wallpaper, up the stairs past the nurse's station. When I arrive at my mother's room she is sitting up in her chair, asleep, belted in, like a passenger in a plane about to land—but somewhere deep in the body of the plane, the fatigued metal has given way and sent this one woman, still strapped to her seat, hurtling through space. Over my mother's bed, someone has taped a list of instructions. > 7:30: Get Mrs. W. up to eat breakfast. Be sure dentures are in with fast-teeth powder. > > 8:00–2:00: Keep Mrs. W. up once she is in chair. She will fight to go back to bed, but she needs to be kept active. "Mom," I say, "wake up!" She opens her eyes. "What is this place?" "A condominium," I lie. "Come on, Ma, let's get the wheelchair and go for a spin around the block." "Why can't I walk? What's the matter with me?" "You broke your hip." I unfold the wheelchair and lift her into it. She is staring at my feet. "You need new shoes," she says. We both gaze down at my scuffed loafers. Miles of pavement have pared the heels away and loosened the stitching. "Promise me you'll buy a new pair. Take some money from my purse. Where is my purse?" I hand it to her. She opens it and peers in and twitches up a five-dollar bill. "Didn't I have more money than this when I started?" "Oh, Mother, you don't need any money here." "Is this an old people's home?" "It's a condominium, Ma." "It's a home. I never thought my children would put me in a home." "Ma, you need twenty-four-hour care." "What did people do in the old days?" What _did_ they do? Dutiful daughters struggled with lifting, feeding, and changing their aged parents. I thought of my mother under the stress of caring for her own mother, who lived with us when I was growing up. Does my mother remember the night she got up to go to the bathroom and passed out from exhaustion? She landed against the radiator. Now, at the edge of her short sleeve I can see the long scar on my mother's arm, deep as a knife wound, where the flesh burned slowly away as she lay, numb to the pain. These dutiful women—caregivers is the current term for them—did not go off to jobs in the morning. And they certainly were not writers. We pass the nurse's station and the board that lists the day's activities. Talking Book Club, Pet Therapy, Monday Night Movie, Bingo, Current Events, Sensory Stimulation, this month's birthdays. In the all-purpose room, the physical therapist is tossing a beach ball to a group of men and women in wheelchairs. None of them raise their arms. As I wheel Mother outside into the sunshine, she raises a pleading face to mine. "Can't you find a little corner in your house for me?" In the evening, when I unlock the door of my sister's house, the tortoise creeps out of his shell and crosses the kitchen floor to meet me. His ancient eyes blink when I scrape his carrots, letting the shavings pile up on the plate like golden pages. Outside in the shimmering heat, children play hide and seek and call to each other. The bedroom is suffocating. I carry my sheet and pillow downstairs and make a bed on the living room floor. I read another chapter in John Gardner's _The Art of Fiction_ and underline a sentence that sounds like good advice, if only I knew how to follow it: "Fiction does its work by creating a dream in the reader's mind." The last sound I hear before falling asleep is the tortoise taking his constitutional, the faint scraping of his claws along the floor. Have I told you everything? No. I have not told you how every evening I sat down at my brother-in-law's electric portable and worked on my story. A story about an angel. The hardest part of writing a story or a novel is beginning it. A letter that arrived recently from a friend of mine whose first novel got rave reviews opens with these words: "So painful coming into possession of a new novel. There is a deep agenda, and I sometimes think I haven't the faintest clue what it is. Still, every day, here I am, at my table, facing it and struggling with lethargy." The material of a story offers itself to the writer like a house in which all the doors and windows are locked. Whose story is it? Whose voice does it belong to? The opening sentence is the key, the way into the house. It may let you in at the front door like a homeowner or at the window like a thief, but it lets you in. For my angel story, I had no opening sentence. But I had a great many notes on angels, particularly those I deemed useful to writers. Uriel the angel of poetry and Raphael the angel of healing led the list. And how many angels there are, for every problem and purpose! There is an angel who presides over memory and an angel who presides over time, even an angel who presides over Monday. There is an angel for small birds and an angel for tame beasts, an angel for solitude and an angel for patience and an angel for hope. The angel who watches over footstools can offer you a pillar of light to support you, a gift that Hemingway and Virginia Woolf would have appreciated since both wrote standing up. I also noted the angels who presided over conditions that writers pray to be spared. Barakiel is the angel of chance; Michael, the angel of chaos and insomnia; Harbonah, the angel of annihilation; and Abaddon, the angel of the abyss. But among the angels, who can really tell which are for us and which against us? There is an angel who presides over hidden things. Forgotten names, lost notes, misplaced drafts—does he hide them or find them? There is an angel of odd events. Are they gifts or griefs, lucky accidents or lost opportunities? Notice, I didn't say I wrote my story. I said, _worked on it._ What did I really know about angels? How do we come to know things as a writer? I looked at my notes, but no story came. What was I looking for? I made tea. I thought of how other writers prepared to face the blank page. Balzac drank fifty cups of coffee a day, till it killed him; Disraeli put on evening clothes; George Cohan rented a Pullman car drawing room and traveled till he was done with the book or story. Emerson took walks. Colette's husband locked her in her room, and Victor Hugo gave his clothes to his servant with instructions to return them when he was done. After struggling with the story for three days, I understood the problem. This story had the shape of the one I'd just finished writing. What we've just written lays its shadow on the next work, and it can happen with any length, any genre. A friend who was working on her second novel told me, "It took me two years to break the spell of my first book when I started my second. I kept wanting to repeat what had worked so well. Combinations of characters, scenes." Writing is like panning for gold. You put your pan down close to the mother lode and scoop up a handful of gravel. You know the grains of ore are sparkling in front of you, if only you could see them. Knowing this, even when you find nothing but broken stones, it's hard to throw them away. So I wrote a story about angels. I wrote badly. I was on the wrong track, but I didn't have the courage to throw those pages away, for then I'd have nothing. Keats was right. All writing is a form of prayer. Was anybody out there listening? Let me say right now that I don't think anyone can command the angel to come, though I've known at least one person to try, a nun who told her first graders about the guardian angels they'd received at baptism and then said, "I want you all to move over and make room for your angel." Twenty-five first graders shifted to the right and made room for the incorporeal and the invisible. _That_ is perfect faith. The nephew who told me the story takes a more skeptical view of angels now. None of this would be worth telling if I hadn't promised my sister that I'd wash Mother's clothes at the laundromat, and what shouldn't happen did happen. I had a simple plan. I would sit with Mother till noon. While she ate her lunch in the dining room, I would carry the laundry basket over to the Wash Bored and read _The Art of Fiction_ and work on my story while the clothes were spinning. And maybe I could take lunch down the street at Jacov's Vegetarian Deli. It had been closed all week, but a sign promised it would be open on Monday. I arrived at Shady Park around eleven and headed for Mother's room. A thin, white-haired woman was walking toward me on crutches, leaning heavily on stout Miss Davidson, the physical therapist. Miss Davidson beckoned me over. "I've been trying to get your mom to walk. She doesn't try. She won't even stand up for me. See if you can get her to make an effort." "I'll do my best," I said. "Now Beulah here is doing fine," said Miss Davidson. The woman on crutches nodded. "I walk every chance I get," she said. "Miss Davidson says, 'Well, how about heading back to your room now?' and I say, 'It hurts, but let's go just once more, up and down the corridor.' I can't wait to go home." Miss Davidson frowned at me. "Medicare won't pay for your mother's room if she's not taking part in the physical therapy program." "Is she doing any activities?" I asked hopefully. "She likes the crafts," said Miss Davidson. "She made a purple flyswatter out of felt yesterday. And she had the kitten on her lap the whole day." "What kitten?" I asked. "Pet therapy," said Beulah. "Your mother wouldn't let anyone else have it. Kept it on her lap the whole time." When I walked into her room, Mother was asleep in her chair. "Ma," I said, "I hear you had a kitten." She opened her eyes. "What kitten?" she said. "She forgot already," said Beulah, leaning in the doorway. Mother turned to her. "My husband taught for forty-seven years at the University of Michigan. We have a total of twenty-two degrees in our family, all from Michigan." "Isn't that nice," said Beulah. "Now me, I never went to college. My papa worked in the steel mill, and so did my husband till it shut down. I'm going downstairs in the wheelchair. They have Kool-Aid on the terrace." We heard her thumping back to her room. Mother gave me an odd look. "Why are you carrying a box of soap?" she asked. "I'm going to wash your clothes." And I heaved the laundry basket onto one hip. Lavender plastic; my sister had picked it especially for her. "You're a good girl," she said and smiled. "Lord, I'm just an ordinary mother. How did I get two such wonderful daughters?" I wheeled her downstairs, and we sat on the terrace with Beulah till lunchtime. The only other patient was a thin, silent man in a wheelchair and a young woman who sat beside him asking, "Grandpa, can you talk? Can you talk, Grandpa?" "That's Mr. Levine," said Beulah. "He's a hundred and two. The president sent him a telegram." She leaned forward and whispered in my ear, "You ask him how old he is and he shouts, 'A hundred and two.' There's not much else he knows. He has Alzheimer's. And he still has a full head of hair." "What disease do I have?" asked Mother. "You broke your hip," I said. "I've had lots of broken bones," said Beulah. "Last year I broke my arm." Mother stared down at her own arm, the scarred one, as if it had just been brought for her approval. "How old it looks," she said softly. The Laundry Bored was nearly empty. A woman was sitting under the lone hairdryer, reading a magazine from which the cover had been ripped away. I threw Mother's clothes in the machine, dialed it to WARM, and poured in the soap. I put _The Art of Fiction_ and my box of Tide in the laundry basket and strolled half a block to Jacov's Vegetarian Deli. The restaurant was tiny—no more than five tables. A sign on the wall read "Tel Aviv, Jerusalem, Ben Gurion Airport. Discover your Roots!" Only one other customer, an elderly man in a black suit, was waiting at the take-out counter for his order. The two cooks wore yarmulkes, yet how different the same garment looked on each of them. The older man was clean-shaven and middle-aged. When he chopped the onions, he seemed to be murdering them. He poured coffee as if it were poison, he shoved a plate of dumplings at the elderly man like a punishment. The younger cook had a thick blond beard and kindly blue eyes, and he loped from the stove to the icebox to the counter as if he had not a care in the world. The menu over the counter listed vegetable soup and vegetarian pizza. "I'll have soup," I said. "What kind of dumplings did you just give that man?" "You won't like them," said the sour cook. "I'll have them anyway," I said. "Try one first," said the young cook, "and if you like it, I'll give you a plateful." He handed me a dumpling on a paper plate. It tasted like nothing I'd ever eaten before or would want to eat again. I ordered a plate of them, to spite the sour cook. The elderly gentleman took his paper plate, paused at a small rack on the wall from which he plucked a greasy page. Out of curiosity, I took one also and found it was a page from the Jewish prayer book, Hebrew on one side, English on the other. There was also a pamphlet, _Thought for the Week_ , so I took that as well and read it as I munched my dumplings: > A Thought for the Week: > > Love your fellow Jew as you love yourself. Alas, I was not a Jew. They would feed me here but they would not love me. I read on: > Sidra Vayeishev. It is different at home (Part II). Last week we learned that our forefather Jacob did not feel "at home" in the world of material possessions. Knowing that he was only a temporary resident in this physical world he felt that his true "home" was in matters of the Neshama, in Torah and Mitzvos. The world with all its comforts, its palaces and mansions, is nothing more than a tent, erected during the journey of life to sleep over for a night, or rest for a day or two. And on a journey, after all, only the bare necessities of eating and sleeping are required; but when the journey is over and one comes home... well, at home it's different. When I'd finished the last greasy bite, I put the pamphlet and the prayer sheet in the rack and returned to the laundromat. The lights on the machine were off. The clothes were clean. So was the top of the machine. The clothesbasket, along with _The Art of Fiction_ and my manuscript, had vanished. Though the day was hot, I felt as cold as if I wore the wind for a cloak. A terrible calm washed over me, leaving me lightheaded. Loss had numbed my capacity to rage. Suddenly, among the _Reader's Digests_ on the folding table, I spied _The Art of Fiction._ I snatched it up. With shaking fingers I riffled through all the other magazines, shook them, and waited for my manuscript to come out of hiding, like a mischievous child. Nothing. On this occasion the angel who presides over hidden things was not on my side. What else was there to do but walk across the street and sit on the bench at the bus stop and consider my life? When the elderly gentleman from Jacov's Deli sat next to me, I was scarcely aware of him till he began to edge closer. "I notice the subject of your book," he said. "It is a subject dear to my heart. Are you a writer?" "Yes," I said. "Stories? You write stories?" "Stories, a novel, poems," I said. "I too wrote stories once," he said, "though I am not a writer now. I am a teacher. A teacher of American literature. But I have written stories." My heart sank. He saw in me a kindred soul. Soon he would press his manuscript upon me. Yet he had used the past tense; perhaps he wrote stories no more. Had his inspiration run dry? Had he lost his memory? "What kind of stories do you write," he asked, "if I may ask?" "Short stories," I said. "Forgive me," he said. "It's like asking the birds what kind of eggs they lay. Blue? Speckled? Large? Small?" "Look," I said, "I can't really talk about my stories just now. Somebody just stole the only copy of the story I've been working on for weeks." "You are sure somebody stole it?" he asked, as if such things did not happen in this world. "I left it in the laundromat while I was eating lunch. And when I came back—" "Excuse me," he interrupted, "but may I tell you a story? Long ago there lived in a north province in China a man good at interpreting events. This man had a son, and one day the son's best mare ran away and was taken by the nomads across the border. The son was distraught, but his father said, 'What makes you think this isn't a blessing?' Many months later, the horse returned, bringing with her a magnificent stallion. The son was delighted and mounted the horse, but had scarcely set out for a ride when he fell and broke his hip. Again he was distraught, and again his father said, 'What makes you think this isn't a blessing?' Two years later the nomads invaded and every able-bodied man marched to battle. All were lost. Only the lame son and the elderly father survived. What is blessing and what is disaster?" "Somebody stole my story. That's a disaster," I said. Two young women joined us on the bench till one murmured to the other, "I can't stand this heat. I'm going to the drugstore." "What you need in the drugstore?" said the other. "Nothing. It's air-conditioned," said the first. "We can look at magazines." I was about to follow them when the elderly gentleman said, "Steinbeck's dog chewed the first half of the draft of _Of Mice and Men._ And Steinbeck forgave him, saying, 'I'm not sure Toby didn't know what he was doing when he ate that first draft. I have promoted Toby-dog to be lieutenant-colonel in charge of literature.' You know, I used to write stories. And I almost wrote a novel. I had three hundred pages written in a big notebook. And then the war came. During the war I lost everything." "How terrible to lose a novel!" I cried. I meant to say, how terrible to lose everything. He shook his head. "Really, in my case, it was a blessing. I wanted to write a family history, a bildungsroman. Thomas Mann was my hero. I had notes, a family tree, plans, hundreds of plans. But in my heart of hearts I knew my novel sounded wooden. A wise man said, 'A writer with a fixed idea is like a goose trying to hatch a stone.' In 1940, I was sent to Ravensbrück. All my life my teachers told me not to daydream. Now it was my salvation. Can you outline a dream? Would it be worth dreaming if you could? In that terrible place I let my mind wander, and my characters came back to me, not as I saw them in my notes and plans but as they saw themselves, full of memories and longings. I understood their real story at last. I turned no one away. Does the sea refuse a single river? Have you heard of Van Der Post and his explorations of Africa?" "No," I said. "Sorry." "Never mind. He tells of the time he traveled to a village where a great hunter lived. When he arrived, he found the hunter sitting motionless. And the villagers said, 'Don't interrupt him. He is doing work of the utmost importance. He is making clouds.'" "Did you finish your novel?" I asked. I have a weakness for happy endings. "How could I finish it? We had no paper. No pens. But we had tongues. So I became a storyteller instead of a writer. I no longer thought of plots, only of voice. Of whose story I was telling. When I hear the voice, I know the story will find me. Storytellers do not lose their stories, except when they die. I like to start my stories in the old style, _once upon a time._ "Once upon a time" is a promise, a promise of a story, and I try to keep my promises. Of course, not everyone agrees with me about these methods. My son, for example. He's a TV writer. Weekends, he wants to write the great American novel, but he doesn't know how to get started. One day he calls me from New York, all excited. 'I've just signed a contract to write the bible!' Naturally I'm interested. He goes on to say that this bible is not from God, of course. This is the book TV scriptwriters use when they're doing a new series of shows. It describes characters, it describes place, it describes adventures. "'And for what show are you writing a bible?' I ask my son. "'It's a mini-series,' he says. 'It's called _The Further Adventures of Alice in Wonderland_.' "'How can that be?' I say. 'There is only one Lewis Carroll.' "'Yes, Papa, but there are five scriptwriters. They'll make up the other adventures. But they can write only about what they know. I'm going to write them a detailed description of Wonderland and the characters.' What do you think, fellow-scribbler? Is it a good idea, the further adventures of _Alice in Wonderland_?" "I don't know," I said. "What happened to your son?" "My son read the Alice books carefully. He mapped the terrain, noted the architecture, the dangers, the geography, the birds and animals. He wrote out character studies of everyone mentioned in the books. And he got paid well. And suddenly a brilliant idea struck him. Why not write a bible for his great-unwritten American novel? How much easier it would be to start his novel if he had a detailed knowledge of his characters. Hadn't his English teachers always said, 'Write about what you know'?" "My teachers said the same thing," I laughed. "They all say it," said the elderly gentleman. "I even said it to my students. But I didn't mean my students should write such a bible. If you take everyone's advice, you'll build a crazy house. My son wrote out descriptions of all his characters and their locale. Then he wrote the first two chapters and showed them to me. 'Aaron,' I said, 'how can I tell you? This is from your head, not your heart. It's predictable. No surprises. Even God is surprised by the actions of his creatures.' "'I've put a lot of time into this,' he said. "'The nest is done, but the bird is dead,' I told him. 'You should take a lesson from your Lewis Carroll. He was a storyteller. I know for a fact that when he sent his Alice down the rabbit hole, he didn't know what would happen next. That white rabbit was a gift from Providence. We should follow Providence, not force it.' He's intelligent, my Aaron, but he thinks too much. He needs intelligence to keep him from hindering himself so he is free to do amazing things. I tell him to watch Charlie Chaplin. You have seen his great film _Modern Times_?" "A long time ago," I said, hoping he wouldn't quiz me on it. "Maybe you remember, near the end, Charlie has to go on the stage and sing a song. And now he can't remember the words. So Paulette Goddard writes the words on his cuff. He goes onstage, he tries to read them, he's hopeless. Not a sound out of him. He's paralyzed. And then Paulette Goddard calls out, 'Never mind the words. Just sing.'" "I think that kind of thing happens only when you tell stories," I said, "not when you write them." "It can also happen when you write them," he said. "You have two choices. You can arrange the material, with outlines. Or you can arrange yourself. I see you looking at the laundromat. You have business there?" "I forgot to put my mom's clothes in the dryer." "And you want to see if the thief returned your manuscript." he added. "Yes," I agreed. Suddenly I remembered my promise. "Excuse me," I said, rising. "Do you know a good shoe store?" "From writing to shoes!" he said and laughed. "I have to run. I promised my mother I'd buy some new shoes." "Are you in such a hurry?" he exclaimed. "Let me tell you about a man who set out to buy himself shoes. He measured his foot and put the measurements away. When he got to the market, he found he'd left the measurements at home. He chose a pair of shoes and hurried home for the measurements, but when he returned the market was closed. He never got the shoes, of course. And that night he dreamed his feet asked him, 'Why didn't you trust us? Why did you trust the measurements more than your own feet?'" We stood up in unison. "There's a department store one street over," he said. "But all shoe stores are good if you need shoes." I didn't go shopping for shoes, and I didn't find my manuscript. When I arrived at Shady Park, Mother was not in her room. She had been wheeled into the TV room. She was asleep, her head nearly on her chest; she had been left at a long empty table with her back to the TV. Probably she had told the attendant that she didn't like television. The other chairs were all facing the set, as if their occupants were worshipping it. I rushed in and turned her chair around. "Wake up, Ma. We're going back to your room." But Mr. Levine's chair was stuck in the doorway, blocking it. He was making helpless swoops with his hands, trying to move the wheels. "Let me help you," I said, and pushed him through. Instantly a ripple of movement started behind me, as if I had waked the very walls. "Lady, can you help me?" "Miss, can you get me out of here? Miss!" Heads lifted, hands waved. "Miss!" I can't help them all, I thought. "Mother, do you want to look at the box of photographs with me?" "I want to lie down," she said. What angel was present in the room with us on that evening? The angel of chance or the angel of memory? The angel of time or the angel of hidden things? After I'd put away her dresses, clean but crumpled from being carried in my arms, I sat on the edge of her bed and flipped through the box of snapshots. Tucked in among the pictures were Christmas cards. Mother never threw away a Christmas card that had a photograph on it. I held up a picture of an elderly couple standing in front of the Taj Mahal. "Who in thunder are they?" exclaimed Mother. "I don't know," I said. "Let me read you the writing on the back. 'We visited fourteen countries and had a wonderful time. Love, Dorothy and Jack.'" "Are both my parents dead?" asked Mother. "Oh, Ma, you know they died a long time ago. If they were alive, they'd be a hundred and twenty." I pulled out another picture and held it up. It showed a middle-aged woman standing on what appeared to be a cistern and smiling. I turned the photograph over and read the scrawled inscription. "This is your old Aunt Velda standing by the well. Clark covered it over for me and put in running water, hot and cold. He also made the driveway you can see behind me, to the left." Mother's face brightened. "I remember that well," she said. "There was a pump on Grandpa's farm in Iowa. Oh, he had acres and acres of the best farmland in the county. And when the men were working in the fields, Grandma would fill a bucket of water from that pump. And she'd send me out with the bucket and dipper to give the men a drink. And it seemed like such a long walk coming and going, I was dying of thirst by the time I got back to the house. And Grandma wouldn't let me pour myself a drink from the pump right off. No. She made me hold my wrists under the spout, and she'd pump and pump the water over them. To cool my blood, she said, so the cold drink wouldn't give me a stomachache. Lord, how good that cold water felt. And how good it tasted." I'd never heard her tell this story. How many other stories lay hidden in her heart, waiting for a listener to wake them? Suddenly I understood my real task. I would lay my angel story aside and forget about it for a while. Tomorrow I would bring a notebook and start writing down her memories. I would have to be patient. Memory has nothing to do with outlines and everything to do with accidents. On my way home I stopped once more at the Wash Bored and couldn't believe my eyes. There on top of the fateful washing machine stood the clothes basket. And safe in its plastic lavender embrace nestled my story. I pulled it out and turned the pages, checking them for bruises. I counted the pages. I pulled up a chair and reread them. Was the angel of hope responsible for what happened next? I threw the entire manuscript in the wastebasket. I would take Rilke's advice: "If the angel deigns to come, it will be because you have convinced him, not by tears, but by your horrible resolve to be a beginner." Voices. Voices. That night, before I fell asleep, I heard the voices of my characters, though faintly, like a conversation accidentally picked up on a long-distance line. I did not let them know I was listening. The next morning I set out for Shady Park Manor with a light heart and was pleasantly surprised to meet my storyteller coming out of the synagogue at the end of the block. "You are going to visit your mother? May I walk with you as far as Jerry's Good and Used?" "What's Jerry's Good and Used?" "Jerry has this and that of everything. His specialty is baseball cards. He calls last night and says, 'I have a treasure. Something you want very much, a card of the great Japanese ballplayer, Sadaharu Oh.' He asks me why I want a card of Sadaharu Oh. I tell him that I want a picture of the man who wrote in his autobiography not about winning but about waiting. Waiting, he says in that book, is the most active state of all. It is the beginning of all action. Did you find your manuscript?" "I found it. And I threw it away. I'm starting over. This time I'll wait for the story to find me. Like you said yesterday." I expected my new acquaintance to offer his congratulations, but he did not. "The freedom of the dream doesn't mean doing nothing. You still have to sit down every day and write. What if the angel came and you were out shopping for shoes? God helps the drowning sailor, but he must row. You have a long journey ahead of you. And it starts with one footstep." "It feels more like an ending than a beginning," I said. "Endings and beginnings—are they so far from each other? When I was in Ravensbrück, I was chosen to die. Only because someone among the killers recognized me was I saved. Now when I tell my stories, I remember that moment. It makes the telling more urgent. How is your mother?" "Fine, I guess. Just very tired." "You know, when I was little, my mother would put me to sleep by describing rooms in all the houses she'd lived in. And so many things happened in those rooms. Now you can hardly find a house in which someone has died or been born. It all happens away from us, in big hospitals." "My mother told me a story yesterday," I said. And I described to him my mother's journey to the harvest fields with the bucket of water, and the journey back to the well, and the cold water on her wrists. He was silent for so long that I felt I had said something foolish. "The cold water—it's such an unimportant detail," I remarked. "Unimportant?" he exclaimed. "That is why it's worth remembering. When I was young I fell in love with a girl named Hilda, who happened to be a twin. I asked her to go out with me. She agreed to go, but only if I could tell her apart from her sister. I studied her face for several minutes. Then she ran and got her twin. Hilda had a blue vein on the bridge of her nose. Unimportant, a blue vein, but when I spied it, I knew I was saved." "I'll save that detail about the cold water for my next story," I assured him. He wagged a finger at me. "Don't save it. Use it, use it now. You just threw out your life savings. This is no time for prudence." We passed Jerry's Good and Used. My storyteller did not go in. Instead he kept pace with me, up the hill to Shady Park Manor. "May I tell you a story as we take this little walk together? Long ago, when wizards still walked the length and breadth of the earth, there arrived in the world of the dead a great magician. "'Why have you come here?' asked the Mistress of the Dead. "The magician explained that when he was building his boat he found he could not finish it without four magic words, and that he had not been able to find them, however far he traveled. "'The Lord of the Dead will never teach you his spells,' answered the Mistress of the Dead. "But the magician could not give up the task of finishing his boat. He wandered here and there until one day he met a shepherd who told him to seek out the giant. "'In his vast mouth there are a hundred magic words. You will have to go down into his enormous belly, and there you will learn marvels. But it's not easy to get there. You must go along a path leaping on the points of women's needles, and over a cross-road paved with sharp swords, and down a third road made of the blades of heroes' axes.' "But the magician was determined to try it. He would do anything to find those four words and finish his boat. Four words! Marvelous words! Would you believe I once bought a photography book because of a single sentence? I was standing in Tucker's—it's a block down the street from us—and I opened up a book and read the epigraph on the first page. It was the beginning and the ending of _Finnegan's Wake._ A way a lone a last a loved along the riverrun past Eve and Adam's Right away I wanted to read _Finnegan's Wake._ But Tucker's didn't have it. And the library was closed for a week. But how could I live without those words? So I bought the photography book. I bought it for those words." We arrived at Shady Park. "It is good you are listening to your mother." "I'm going to write her memories down. I don't want to forget them." "If you forget a few, don't worry. What you need will come back to you. We don't really understand something until we have forgotten it. Live in your roots, not in your branches." I took the elevator to the second floor. When I stepped out, a nurse hurried up to me. "Your mother had a seizure last night. We phoned for the ambulance just an hour ago. Call Dr. Rubin right away—you can use the phone at the nurse's station." The voice of medical authority at the other end of the phone named the problem: status epilepticus. Dr. Rubin explained he had given her Valium and phenobarbital. "It took us over an hour to stop her seizures. Now she's asleep." "Did she have a stroke?" "This morning I thought yes. When I looked at the CAT scan, I thought no. Her brain is shrunken, and there's an abnormal pattern of electric ions. It's probably caused by the little strokes she's had earlier." "I'll be right over." I hung up, and the nurse touched my arm. "I'm so sorry," she said. "Let me call you a cab." I waited downstairs for the cab. The receptionist was changing the bulletin board, posting the new activities. Bingo, Sensory Stimulation, Current Events, Patio Outing. _A way a lone a last a loved along the riverrun._ Dr. Rubin and I are standing by my mother's bed in the intensive care section. Mother is sleeping under the watchful gaze of the IV and the blood pressure basket hanging over her bed, its black tubes coiled into a nest. Over the basket a large plastic bottle bubbles and quakes. This is not the first time I have seen Mother in intensive care. "When do you think she'll wake up?" I ask. The doctor shrugs. "Who knows? It could be tomorrow. It could be in ten minutes. Or it could be never." I reach out and touch her hair, still soft and wavy, and the translucent skin on her temple: pale freckled silk. The doctor pulls away the plastic respirator that covers the center of her face with a clear green beak, and her sunken cheeks flutter in and out like the throat of a frightened bird. A tube snakes out of her nose, ready for her next feeding. Her mouth is a small black hole. The doctor leans close to her face, as if he might kiss her. Then he pries open her eyelids and looks deeply into her pupils and calls, "Mrs. Williams! Mrs. Williams!" Two green-gray coins stare back at him, as cold and indifferent as the eyes of a fish. I feel my knees growing weak, and I sit down fast on the edge of her bed. "Can she hear us now?" "Possibly. There's no way of knowing for sure." When he leaves us alone together, I take her hand, frail as the claw of a wren. The IV has left a deep bruise on her arm. How old it looks, this arm, limp when I lift it, a mottled mineral brown across which white scars move like the shapes of ancient beasts. I know I will never see her alive again. I do not know if she can hear. I put my mouth close to her ear and tell her I love her. I thank her for telling me about the cold water. I tell that I lost my story in Pittsburgh, a story about angels. I lost it at the laundromat, and I met a man who told me how to find it again. Maybe he wasn't a man at all, maybe he was the story angel? He did not have wings, but who needs wings in Pittsburgh? Though my mouth is touching her ear, I feel my mother going farther and farther away. I want to talk to her till she is out of earshot. Though she is traveling with empty hands, I do not want my mother, who has given me so much, to leave with an empty heart. I give her an angel, a daughter, and herself. And I give her my promise to save them: _once upon a time._ # Acknowledgments "The Hucklebone of a Saint," "Theo's Girl," and "Sinner, Don't You Waste that Sunday," are taken from _Childhood of the Magician_ (Liveright); "Doctrine of the Leather-Stocking Jesus" and "The Well-Tempered Falsehood: The Art of Storytelling," from _Angel in the Parlor_ ; "Salvage for Victory," from chapter 28 of _Things Invisible to See_ ; "How Poetry Came into the World and Why God Doesn't Write It," from _The Bread Loaf Anthology of Contemporary American Short Stories_ (University Press of New England); "Telling Time," from _The Bread Loaf Anthology of Contemporary American Essays_ (University Press of New England). "Close Encounters of the Story Kind" appeared in _New England Review._ "Questions My Son Asked Me, Answers I Never Gave Him," "How to Stuff a Pepper," "Moss," "How the Hen Sold Her Eggs to the Stingy Priest," "A Humane Society," "In Praise of ABC," "For You, Who Didn't Know," "Angels in Winter," "When There Were Trees," from _Household Tales of Moon and Water_ (Harcourt Brace Jovanovich [the "Material"] [Seq. Num. 25308]); from _Carpenter of the Sun_ : "Carpenter of the Sun"; from _Water Walker_ : "A Wreath to the Fish," "Walking Poem," "In Praise of Unwashed Feet," "Onionlight," "The Potato Picker," "Roots," "Marriage Amulet," "Little Elegy with Books and Beasts," "Buffalo Climbs Out of Cellar," "Saints Lose Back," "Divine Child Rolls On." "The Poet Invites the Moon for Supper," "The Poet Takes a Photograph of His Heart," "The Poet Turns His Enemy into a Pair of Wings," "The Poet's Wife Watches Him Enter the Eye of the Snow," from _19 Masks for the Naked Poet,_ copyright © 1971 by Nancy Willard. "William Blake's Inn for Innocent and Experienced Travelers," "Blake Leads a Walk on the Milky Way," "The King of Cats Sends a Postcard to His Wife," "The Tiger Asks Blake for a Bedtime Story," "Epilogue," from _A Visit to William Blake's Inn,_ copyright © 1981 by Nancy Willard. "One for the Road" appeared in _Field._ Other poems are taken, as acknowledged, from _The Ballad of Biddy Early._ # About the Author Nancy Willard grew up in Ann Arbor, Michigan. She has written two novels, seven books of stories and essays, and twelve books of poetry, including _The Sea at Truro_ (2012). A winner of the Devins Memorial Award, she has received NEA grants in both fiction and poetry. Her book _Water Walker_ was nominated for the National Book Critics Circle Award, and she won the Newbery Medal for _A Visit to William Blake's Inn_. Willard is an emeritus professor at Vassar College. _Eric Lindbloom_ All rights reserved, including without limitation the right to reproduce this book or any portion thereof in any form or by any means, whether electronic or mechanical, now known or hereinafter invented, without the express written permission of the publisher. This collection includes works of fiction, in which names, characters, places, events, and incidents either are the product of the author's imagination or are used fictitiously. Any resemblance to actual persons, living or dead, businesses, companies, events, or locales is entirely coincidental. Copyright © 1991 by Nancy Willard Cover design by Kathleen Lynch 978-1-4804-8155-8 This edition published in 2014 by Open Road Integrated Media, Inc. 345 Hudson Street New York, NY 10014 www.openroadmedia.com # EBOOKS BY NANCY WILLARD **FROM OPEN ROAD MEDIA** Available wherever ebooks are sold **Open Road Integrated Media** is a digital publisher and multimedia content company. Open Road creates connections between authors and their audiences by marketing its ebooks through a new proprietary online platform, which uses premium video content and social media. **Videos, Archival Documents, and New Releases** Sign up for the Open Road Media newsletter and get news delivered straight to your inbox. Sign up now at www.openroadmedia.com/newsletters **FIND OUT MORE AT** **WWW.OPENROADMEDIA.COM** **FOLLOW US:** **@openroadmedia and** **Facebook.com/OpenRoadMedia**
{ "redpajama_set_name": "RedPajamaBook" }
8,536
package org.dinesh.er.database; import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import org.dinesh.er.exception.ErException; import org.dinesh.er.utils.StatementHandler; /** * A basic NTriples parser used by NTriplesDataSource. */ public class NTriplesParser { private Reader src; private StatementHandler handler; private int lineno; private int pos; private String line; /** * Reads the NTriples file from the reader, pushing statements into * the handler. */ public static void parse(Reader src, StatementHandler handler) throws IOException { new NTriplesParser(src, handler).parse(); } private NTriplesParser(Reader src, StatementHandler handler) { this.src = src; this.handler = handler; } /** * Alternate entry point to the parser for when the driving loop is * outside the parser. Statements get passed to the handler. */ public NTriplesParser(StatementHandler handler) { this(null, handler); } /** * Push a line into the parser. If it contains a statement, that * statement will be passed to the handler. */ public void parseLine(String line) { this.line = line; parseLine(); } private void parse() throws IOException { BufferedReader in = new BufferedReader(src); line = in.readLine(); while (line != null) { lineno++; parseLine(); line = in.readLine(); } } private void parseLine() { pos = 0; skipws(); if (pos >= line.length() || line.charAt(pos) == '#') return; // think there's nothing to do in this case // subject String subject; if (line.charAt(pos) == '<') subject = parseuri(); else if (line.charAt(pos) == '_') subject = parsebnode(); else throw new ErException("Subject in line " + lineno + " is neither URI nor bnode: " + line); skipws(); // property if (pos >= line.length()) throw new ErException("Line ends before predicate on line " + lineno); else if (line.charAt(pos) != '<') throw new ErException("Predicate does not start with '<', " + "nearby: '" + line.substring(pos - 5, pos + 5) + "', at " + "position: " + pos + " in line " + lineno); String property = parseuri(); skipws(); // object boolean literal = false; String object; if (pos >= line.length()) throw new ErException("Line ends before object on line " + lineno); else if (line.charAt(pos) == '<') object = parseuri(); else if (line.charAt(pos) == '"') { object = unescape(parseliteral()); literal = true; } else if (line.charAt(pos) == '_') object = parsebnode(); else throw new ErException("Illegal object on line " + lineno + ": " + line.substring(pos)); // terminator skipws(); if (pos >= line.length() || line.charAt(pos++) != '.') throw new ErException("Statement did not end with period; line: '" + line + "', line number: " + lineno); skipws(); if (pos + 1 < line.length()) throw new ErException("Garbage after period on line " + lineno); handler.statement(subject, property, object, literal); } private static String unescape(String literal) { char[] buf = new char[literal.length()]; int pos = 0; for (int ix = 0; ix < literal.length(); ix++) if (literal.charAt(ix) == '\\') { ix++; char ch = literal.charAt(ix); if (ch == 'n') buf[pos++] = '\n'; else if (ch == 'r') buf[pos++] = '\r'; else if (ch == 't') buf[pos++] = '\t'; else if (ch == '\\') buf[pos++] = '\\'; else if (ch == '"') buf[pos++] = '"'; else if (ch == 'u') { ix++; // step over the 'u' if (literal.length() < ix + 4 || !(hexchar(literal.charAt(ix)) && hexchar(literal.charAt(ix + 1)) && hexchar(literal.charAt(ix + 2)) && hexchar(literal.charAt(ix + 3)))) throw new ErException("Bad Unicode escape: '" + literal.substring(ix - 2, ix + 4) + "'"); buf[pos++] = unhex(literal, ix); ix += 3; } else throw new ErException("Unknown escaped character: '" + ch + "' in '" + literal + "'"); } else buf[pos++] = literal.charAt(ix); return new String(buf, 0, pos); } private static boolean hexchar(char ch) { return (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f'); } private static char unhex(String literal, int pos) { int charno = 0; for (int ix = pos; ix < pos + 4; ix++) { int digit; char ch = literal.charAt(ix); if (ch >= '0' && ch <= '9') digit = ch - '0'; else if (ch >= 'a' && ch <= 'f') digit = (ch - 'a') + 10; else digit = (ch - 'A') + 10; charno = (charno * 16) + digit; } return (char) charno; } private String parseuri() { int start = pos + 1; // skip initial '<' while (pos < line.length() && line.charAt(pos) != '>') pos++; if (pos >= line.length()) throw new ErException("Line ends in URI at line " + lineno); pos++; // skip final '>' return line.substring(start, pos - 1); } private String parseliteral() { pos++; // skip initial quote int start = pos; while (line.charAt(pos) != '"') { if (line.charAt(pos) == '\\') pos++; // skip escaped char (we decode later) pos++; } int end = pos; pos++; // skip final quote if (line.charAt(pos) == '^') parsedatatype(); else if (line.charAt(pos) == '@') parselangtag(); return line.substring(start, end); } private void parsedatatype() { pos++; // skip first ^ if (line.charAt(pos++) != '^') throw new ErException("Incorrect start of datatype"); if (line.charAt(pos) != '<') throw new ErException("Datatype URI does not start with '<'"); parseuri(); } private void parselangtag() { pos++; // skip the '@' char ch = line.charAt(pos); while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) ch = line.charAt(++pos); if (line.charAt(pos) != '-') return; pos++; // consume '-' ch = line.charAt(pos); while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9')) ch = line.charAt(pos++); } private String parsebnode() { int start = pos; pos++; // skip '_' if (line.charAt(pos++) != ':') throw new ErException("Incorrect start of blank node"); char ch = line.charAt(pos++); while ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9')) ch = line.charAt(pos++); return line.substring(start, pos - 1); } private void skipws() { while (pos < line.length()) { char ch = line.charAt(pos); if (!(ch == ' ' || ch == '\t')) break; pos++; } } }
{ "redpajama_set_name": "RedPajamaGithub" }
7,600
\section{Introduction} Laser-driven microdroplet-tin plasma provides the extreme-ultraviolet (EUV) light that is used in state-of-the-art EUV lithography\,\cite{versolato2019physics,Purvis2018industrialization,Moore2018euv,Schafgans2015performance,OSullivan2015,Banine2011,Benschop2008}. Ever more powerful sources of EUV light are required for future lithography applications. This EUV light is generated from electronic transitions in multiply-charged tin ions that strongly emit radiation in a narrow band around 13.5\,nm\,\cite{Azarov1993,Churilov2006SnIX--SnXII,Churilov2006SnVIII,Churilov2006SnXIII--XV,Ryabtsev2008SnXIV,Tolstikhina2006ATOMICDATA,DArcy2009a,Ohashi2010,Colgan2017,Torretti2017,Scheers2020}. EUV-emitting plasma in an industrial nanolithography machine is driven by CO$_2$-gas lasers with a 10-\textmu m wavelength. Such plasma achieves particularly high conversion efficiencies (CE) of converting drive laser light into EUV radiation in a 2-\% wavelength bandwidth around 13.5\,nm that can be transported by the available Mo/Si multilayer optics\,\cite{Bajt2002,Huang2017}. Near- or mid-infrared solid-state lasers may however soon become an attractive alternative to the CO$_2$-gas lasers because such modern solid-state lasers are expected to have a significantly higher efficiency in converting electrical power to laser light. Furthermore, they may reach much higher pulse energies and output powers, in turn enabling more EUV output. Big Aperture Thulium (BAT) lasers\,\cite{Danson2019petawatt,Sistrunk2019} represent a particularly promising class of novel, powerful laser systems that has recently drawn significant attention. These lasers would operate at 1.9-\textmu m wavelength, in between the well-known cases of 1- and 10-\textmu m drive lasers. Recent simulation work indicates that a global CE optimum lies within this range of 1- and 10-\textmu m drive laser wavelength\,\cite{Siders2019euvlitho}. Briefly, such studies point out that the longer-wavelength drivers are associated with sub-optimal absorption of the laser energy by the plasma whereas shorter-wavelength drivers may exhibit severe opacity broadening of the EUV spectrum out of the 2-\% acceptance bandwidth \cite{Schupp2019b,Freeman2012laser,Harilal2011effect}. To date, no experimental studies of mass-limited, microdroplet-tin-based plasmas driven by lasers in this wavelength range are however available to verify these claims. In this article a study of the EUV emission spectrum of 2-\textmu m-wavelength-laser-driven tin-microdroplet plasma is presented. The laser light is obtained from a master oscillator power amplifier setup that comprises a series of KTP crystals pumped by a ns-pulsed Nd:YAG laser ($\lambda=1$\,\textmu m), enabling to gauge the potential of, e.g., thulium lasers without the effort of building one. The recorded spectroscopic data are compared to those obtained from a 1-\textmu m-driven plasma under otherwise identical conditions, over a wide range of droplet sizes and laser intensities. Radiation-hydrodynamic simulations using the RALEF-2D code \cite{Basko2010development}, are presented to support the experimental findings. Following the recent work of Schupp \textit{et al}.\,\cite{Schupp2019b} on Nd:YAG-laser-pumped plasma, an analytical solution for radiation transport in an optically thick one-dimensional plasma is used to quantify the influence of optical depth on the broadening of the key emission feature at 13.5\,nm. \section{Experiment} In the first set of experiments micrometer-sized liquid tin droplets are irradiated with high-intensity 2-\textmu m-wavelength laser pulses produced in a master oscillator power amplifier (MOPA). Following the work of Arisholm \textit{et al.}\,\cite{Arisholm2004}, the MOPA consists of a singly resonant optical parametric oscillator (OPO) in collinear alignment followed by an optical parametric amplifier (OPA). The latter comprises two 18-mm long KTP crystals operated in type II phase matching. The setup (see Fig.\,\ref{fig:temp1}) is pumped by a seeded Nd:YAG laser with a spatially flat-top and a temporally Gaussian profile of 10\,ns (FWHM). The OPO is pumped with 18\,mJ within a 1.5-mm diameter beam resulting in an idler beam energy of 1.8\,mJ at a wavelength of 2.17\,\textmu m. The OPO is operated slightly off its degeneracy point to minimize back conversion of signal and idler into the pump wavelength, a process which reduces beam quality of both beams. After the OPO the signal beam is removed and the idler beam expanded to 11\,mm and amplified in the OPA. Using 1.3\,J of pump energy within a beam diameter of 10\,mm, 260\,mJ of 2-\,\textmu m radiation are obtained, summing signal and idler pulse energies. The pulse duration of both beams after amplification is 4.3\,ns. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{MOPA_layout_essentials_arisholm_layout_solid_target_v2.pdf} \caption{Schematic representation of the experimental setup. A master oscillator power amplifier (MOPA) setup, comprising an optical parametric oscillator (OPO) and an optical parametric amplifier (OPA), is pumped by a Nd:YAG laser (blue line). The signal beam is separated via polarization optics and the idler beam ($\lambda=$2.17\,\textmu m) is focused onto tin microdroplets within a vacuum chamber. EUV emission is captured by a transmission grating spectrometer positioned at \SI{60}{\degree} with respect to the laser axis. An additional, third KTP crystal (dashed outline) was used in the OPA in a subset of the experiments.} \label{fig:temp1} \end{figure} For the experiments the signal beam is removed via polarization optics and the idler beam is solely used. The idler beam is focused onto several ten-micrometer-sized liquid tin droplets created via coalescence of even smaller microdroplets from a tin jet in a vacuum chamber that is kept at or below $10^{-6}$\,mbar. The diameter of the microdroplets is adjustable within a range from 16--51\,\textmu m. The focal spot is elliptical and has a size of 65x88\,\textmu m (FWHM) and laser intensities of up to \SI{2.1E11}{\intensity} are obtained on the tin droplets. Data taken with this 2-crystal setup is used for Sec.\,\ref{sec:depthscaling} and is part of the data in Fig.\ref{fig:temp2}(c). The intensity is defined as peak intensity in time and space and calculated to $I_L=(2\sqrt{2\ln{2}/2\pi})^3 E_L/ab t_p$ with laser energy $E_L$, FWHMs $a$ and $b$ along the major and minor axis of the bivariate Gaussian and pulse duration $t_p$. The energy in the beam is adjusted by the combination of a half-waveplate and polarizer. % The data displayed in Fig.\,\ref{fig:temp2}(a) was taken in a later experiment and after installation of a third crystal in the OPA which increased the energy in signal and idler combined to 360\,mJ while the pulse duration increased slightly to 4.7(3)\,ns (FWHM). The produced beam has a symmetric focal spot and measurements are obtained for three focal spot sizes of 106, 152 and 194\,\textmu m (FWHM) that are obtained using lenses of different focal distance length. The data obtained in the first and this later experiment is combined in Fig.\,\ref{fig:temp2}(c). To enable a direct comparison with plasmas driven by 1-\textmu m wavelength laser pulses, light from the 1-\textmu m pump laser is redirected before entering the MOPA and is focused onto the tin droplets instead. Again, a combination of a half-wave plate and polarizer allows for adjustment of the beam energy. The focal spot has a symmetric Gaussian shape of 86\,\textmu m (FWHM). % The EUV emission from the tin plasma is collected by a transmission grating spectrometer \cite{Bayraktar2016broadband} set up under a \SI{60}{\degree} angle with respect to the incoming laser beam. The spectrometer was operated with a 10,000\,lines/mm grating, a 25-\textmu m slit and without filter. The measured spectra are corrected for the grating's first and second order diffraction efficiency as well as for the quantum efficiency of the camera. The wavelength is calibrated in a separate experiment using atomic line emission from an aluminum plasma. % Spectral purity (SP), defined as the ratio of spectral energy in a 2\% bandwidth around 13.5\,nm to the total EUV energy, is used to characterize the EUV light source. All SP values provided are calculated with respect to the measured spectral range of 5.5--\SI{25.5}{nm}. \begin{figure}[tb] \centering \includegraphics[scale=1]{intensity_scan.pdf} \caption{Spectra from tin droplet plasma observed at various intensities of the (a) 2-\textmu m beam (4.7\,ns pulse duration, 106\,\textmu m FWHM, 3 KTP crystals) and the (b) 1-\textmu m Nd:YAG beam (10\,ns pulse duration, 86\,\textmu m FWHM). The droplet size in both cases is 30\,\textmu m. (c) Ratio of the intensities of 1- and 2-\textmu m drive laser beams needed to obtain spectra with similar spectral features. The data points represent the average intensity ratios from data taken with four different laser spot sizes of the 2\,\textmu m laser beam of 65x88, 106, 152 and 194\,\textmu m (FWHM), respectively. The error bars indicate the standard deviation per measurement. The red line represents the average over all data points and the shaded band the standard deviation of the average.} \label{fig:temp2} \end{figure} \section{Scaling of spectral features with laser intensity and wavelength} \label{sec:spectralscaling} For defining development targets regarding power and pulse energy of future 2-\textmu m lasers for use in EUV light sources, it is particularly relevant to know the laser intensity needed to obtain a tin charge state balance optimal for the production of 13.5-nm light. In this section the laser intensity on the tin droplet is scanned and the optimal laser intensity determined as the value at which SP is highest, given that SP is the ultimate limit of CE as follows from energy conservation CE$<$SP/2 for isotropic emission\,\cite{Schupp2019}. To better understand the relevant plasma temperatures and densities, we study the ratio of 1- and 2-\textmu m laser intensities at which plasmas of equal temperatures are established. Plasma temperature is experimentally established via the shape and amplitude of charge-state-specific spectral emission features \cite{Svendsen1994,Torretti2018,torretti2019spectral,Bouza2020}. These features are indicative of the plasma's charge state distribution which is predominantly dependent on plasma temperature\,\cite{Basko2015}. The experimental results are then compared to computer simulations using the radiation-hydrodynamic code RALEF-2D as well as to previous analytic work \cite{Basko2015}. \subsection{Spectral dependencies on drive laser intensity} In the experiments, first the idler beam from the MOPA is focused onto a 30-\textmu m diameter droplet and spectra are measured using the 106-\textmu m spot size at multiple intensities within a range of 0.1--\SI{2.2}{\intensity} (see Fig.\,\ref{fig:temp2}(a)). At the lowest laser intensity the plasma strongly emits around 14.5\,nm and distinct $4d$--$4f$ transitions in Sn$^{6+}$ are visible around 17\,nm \cite{Bouza2020}. Emission between 18 and 20\,nm can be mainly attributed to Sn$^{5+}$. At 15.7\,nm, a strong emission feature from $4d$--$4f$ and $4p$--$4d$ transitions in Sn$^{7+}$ is visible. Going up this \q{ladder} of charge states, emission from $4d$--$4f$ and $4p$--$4d$ transitions in Sn$^{8+}$ is visible at 14.8\,nm and from Sn$^{9+}$ at 14.2\,nm. With increasing laser intensity the average charge state of the plasma increases and emission from Sn$^{10+}$ is evident in the 9.5--10-nm region\,\cite{Torretti2018}. Increasing laser intensity beyond \SI{E11}{\intensity}, the plasma strongly emits at 13.5\,nm. This emission originates from the $4d$--$4f$, $4d$--$5p$ and $4p$--$4d$ unresolved transitions arrays (UTAs) in Sn$^{8+}$ to Sn$^{14+}$ \cite{OSullivan2015, Churilov2006SnIX--SnXII}. With the strong emission at 13.5\,nm, charge state specific features become visible between 7 and 12\,nm. These features belong to the same Sn$^{8+}$ to Sn$^{14+}$ ions and here the $4d$--$5f$, $4d$--$6p$ and $4p$--$5s$ transitions contribute strongest \cite{Svendsen1994,Torretti2018}. With increasing laser intensity SP rises to values of 15\,\% at \SI{0.8e11}{\intensity} where charge state balance is optimal for in-band EUV emission, before reducing again at even higher intensity values (see inset in Fig.\,\ref{fig:temp2}(b)). Second, plasma is created using laser light of 1-\textmu m wavelength. Spectra for laser intensities within the range of 0.3--\SI{4.4e11}{\intensity} are shown in Fig.\,\ref{fig:temp2}(b). When compared to the 2-\textmu m drive-laser case the spectra show very similar shape, albeit at an apparent increased overall width. Again the same emission features of charge states Sn$^{5+}$ to Sn$^{9+}$ are visible at the lowest laser intensity but with somewhat less prominent emission features. This reduction in prominence is particularly noticeable for the peaks of charge states Sn$^{6+}$ and Sn$^{7+}$ (between 14 and 16\,nm). Further the Sn$^{9+}$ peak at 14.2\,nm is hardly visible (cf. \SI{0.2E11}{\intensity} in the 2-\textmu m case). The SP rises until it reaches values of 9.7\,\% around \SI{2E11}{\intensity} and subsequently decreases as the charge state balance becomes sub-optimal for emission of 13.5-nm light. The peak intensities used in this work agree well with previously published work, where the optimal SP was found at an intensity of \SI{1.4E11}{\intensity} using a temporally and spatially box-like laser profile to illuminate the tin droplets \cite{Schupp2019}. The higher intensity value found in this work is attributed to the fact that, because of their spatial extent, the droplets experience a slightly lower average intensity compared to the peak values stated. To obtain the sought-for laser-intensity ratio $I_{1\mu m}/I_{2\mu m}$, each spectrum of the 2-\textmu m laser case at intensity $I_{2\mu m}$ is matched to a spectrum of the 1-\textmu m case at intensity $I_{1\mu m}$ for which the resemblance of the relative amplitudes and shape of spectral features is best matching. As the spectral features are characteristic of individual tin charge states \cite{torretti2019spectral, Bouza2020} this comparison provides access to the scaling of the plasma's charge state distribution (and hence temperature) with laser wavelength. For each match of laser intensities the ratio $I_{1\mu m}/I_{2\mu m}$ is calculated and plotted as a function of $I_{1\mu m}$ in Fig.\,\ref{fig:temp2}(c). The data points represent the average of comparisons made for multiple spot size conditions and for two droplet size conditions. In all cases spectra were compared to the ones taken with the 1-\textmu m wavelength laser beam size of 86\,\textmu m. More specifically, the comparison encompasses measurements with a 30-\textmu m diameter droplet for 2-\textmu m case beam sizes of 65x88, 106x106, 152x152 and 194x194\,\textmu m and on a 19-\textmu m diameter droplet for the 65x88-\textmu m beam. The red line shows the average $I_{1\mu m}/I_{2\mu m}=2.1(6)$ of all measurements with the standard deviation (distribution width and not the error-on-the-mean) of the mean value as red shaded area. The depicted uncertainty is the standard deviation of the mean. \subsection{Theory and discussion} The temperature of a plasma can be expressed analytically if the equation of state (EOS) is sufficiently well known. The required EOS parameters will however depend on the location in the plasma where the laser light is absorbed. Two cases can be distinguished\,\cite{Basko2015}. Case I: absorption of laser light dominantly occurs close to the critical surface where the plasma's electron density equals the critical density ($n_e\approx n_{crit}\sim\lambda^{-2}$). This case is relevant for long wavelength laser light, e.g., from CO$_2$ lasers. Case II: absorption is already significant in the underdense corona where the electron density is lower than the critical electron density. For laser absorption of 1- and 2-\textmu m beams, case II applies and the tin plasma temperature can be written as \cite{Basko2015} \begin{equation} \label{eqn:Basko_T} T \propto \left( \frac{1}{R\lambda^2} \right)^{-0.19} [I (1-\phi_r)]^{0.44}, \end{equation} with laser wavelength $\lambda$, laser intensity $I$, radiative loss fraction $\phi_r$ of the plasma and characteristic radius of the sonic surface $R$, defined as the contour at which the ion velocity equals the local sound velocity. The numerical values for the powers -0.19 and 0.44 originate from the EOS\,\cite{Basko2015}. Differences in radiative losses of the plasmas are neglected in the following, as they may be small for similar density and temperature plasmas. The sonic surface $R$ is only slightly wavelength dependent and the small difference can be neglected. From Eq.\,\eqref{eqn:Basko_T}, an intensity ratio $I_{i}/I_{j}=(\lambda_{j}/\lambda_{i})^{0.86}$ here $I_{1\mu m}/I_{2\mu m}=1.8$ is calculated for $\lambda=1$ and 2-\textmu m plasmas exhibiting equal plasma temperatures. The predicted ratio of 1.8 agrees well with the experimental one of 2.1(6) and well approximates a scaling with $\lambda^{-1}$. \begin{figure} \centering \includegraphics{RALEF_maxTemp.pdf} \caption{Top: maximum temperature of a tin plasma for various laser intensities calculated with the two-dimensional-radiation transport code RALEF-2D. A 30-\textmu m diameter droplet is illuminated with temporally and spatially Gaussian-shaped laser pulses of wavelengths 1 and 2\,\textmu m. Center: temperature and electron density lineout along the axis of the incoming laser beam. Bottom: frequency-integrated local radiation field intensity $I_{rad}$ of the plasma and its normalized derivative $dI_{rad}$. The radiation field intensity is calculated from Eq\,\eqref{eq:radiation-field-intensity} using the density and temperature lineouts depicted in the center panel. For more detail see text.} \label{fig:temp6} \end{figure} Alongside this analytical approach, the radiation hydrodynamic code RALEF-2D \cite{Basko2017ralef} is used to determine the laser intensity ratio yielding equivalent plasma temperatures. RALEF-2D was developed to simulate laser plasma interaction and solves the equations of fluid dynamics in two dimensions (assuming cylindrical symmetry around the laser beam propagation axis) while including necessary physical mechanisms such as laser absorption, thermal conduction and radiation transport. The latter is needed for accurate predictions of a strongly radiating plasma, which is true for the current case. An extensive set of simulations has been performed at conditions close to the experimental ones. A 30-\textmu m diameter droplet is irradiated by temporally and spatially Gaussian beams. The 1- and 2-\textmu m beams have pulse durations of 10 and 4.3\,ns (FWHM) and sizes of 80 and 100\,\textmu m (FWHM), respectively. Laser intensities in the range spanning \num{E10} to \SI{E12}{\intensity} are simulated. The plasma's peak temperature is plotted in Fig.\,\ref{fig:temp6}. For a given laser intensities the maximum temperature is consistently higher in the 2-\textmu m case. We note that the different pulse durations (10 vs. 4.3\,ns) have a minimal impact on temperature and density scales. The maximum temperatures are seen to follow Eq.\,\eqref{eqn:Basko_T} fitted as $T[\textrm{eV}] = a \, \lambda^{0.38}[\textrm{\textmu m}] \, I^{0.44}[\SI{E11}{\intensity}]$, where a common amplitude $a=43$ is determined by a global fit to all data. Eq.\,\eqref{eqn:Basko_T} captures the scaling of the peak plasma temperature over two decades in laser intensity. Further shown in Fig.\,\ref{fig:temp6} are temperature and electron density lineouts along the laser axis away from the droplet at intensities relevant for the efficient emission of EUV light. The intensity of the 1- and 2-\textmu m cases were chosen to have nearly identical peak electron temperature. This temperature strongly increases with distance from the droplet surface and peaks around 11\,\textmu m from the droplet surface before it reduces again at larger distances. The maximum temperature is obtained at a factor of 2.0 lower density in the 2-\textmu m case. The point of highest temperature is much closer to the critical density in the 2-\textmu m case indicating that the absorption of laser light occurs closer to critical density while the conditions for laser absorption of case II are still met. Following Ref.\,\cite{Basko2015}, and references therein, the scaling of the relevant plasma electron density with wavelength can also be approximated invoking a constant absorbed fraction of the laser light, $k_L R$\,=\,constant. Inserting the Kramers' absorption coefficient for the laser radiation $k_L$ we obtain \cite{Basko2015,Oster1961emission} \begin{equation} \label{eq:Basko_coronal_abs_cond} (R \lambda^2) \rho^2 \bar{z}^3 T^{-3/2} = \mathrm{constant}, \end{equation} with the mass density $\rho$ and the plasma's average charge state $\bar{z}$. Considering that mass density $\rho$ and ion density $n_i$ follow the ratio of electron density and average charge state $\rho \sim n_i=n_e/\bar{z}$, where $\bar{z}\approx 22.5 T^{0.6}$ \cite{Basko2015}, it becomes clear that the ratio of the electron densities lineouts displayed well approximates the ratio of mass density between the two laser wavelength cases. All other factors remaining constant in Eq.\,\eqref{eq:Basko_coronal_abs_cond}, a reciprocal scaling of mass density $\rho$ and wavelength $\lambda$ becomes directly apparent. The difference in mass density can thus be attributed to the difference in absorptivity of the laser radiation from Kramers' law\cite{Kramers1923}. This inversely proportional scaling of density with wavelength is the root cause of the observed intensity ratio. The bottom panel of Fig.\,\ref{fig:temp6} shows the radiation field intensity $I_{rad}$ and its normalized derivative $dI_{rad}$. The frequency-integrated radiation field intensity is calculated from \begin{equation} \label{eq:radiation-field-intensity} I_{rad}(s) = I_0 e ^{-\int^{s}_{s0} \alpha (s')ds'} +\int^{s}_{s0} \alpha (s') B(s') e^{-\int^{s}_{s'} \alpha (s'')ds''} ds' \end{equation} with the Planck mean absorptivity $\alpha_p[\mathrm{m}^{-1}] = \num{3.3E-7} \cdot \rho[\mathrm{g/cm}^{3}] \cdot T^{-1}[\mathrm{eV}]$ using the temperature and electron density information in Fig.\,\ref{fig:temp6}. For more information see Ref.\,\cite{Torretti2020prominent}. The normalized derivatives $dI_{rad}$ peak at 6.5 and 8\,\textmu m distance from the droplet surface for the 1- and 2-\textmu m cases, respectively. They show that the typical length scales of emission are similar in both wavelength cases. The point of largest change in radiation field intensity is located slightly closer to the droplet surface than the point of maximum temperature. The significantly higher density more than compensates for the drop in temperature. The point of largest change in the radiation field intensity of the 1-\textmu m driven plasma occurs relatively far from the critical density, whereas in the 2-\textmu m driven plasma this point lies close to the critical density, an observation explained by the distances between the respective maximum temperatures and critical densities. The radiation field intensity at large distances from the droplet surface is approximately a factor of two higher in the 1-\textmu m case because of the factor of two higher (emitter) density compared to the 2-\textmu m case. \section{Scaling of optical depth \label{sec:depthscaling} The scaling of mass density with drive laser wavelength $\rho \sim \lambda^{-1}$ at similar length scales, as established by our simulations, indicates that the optical depth of the plasma, being a product of atomic opacity, mass density and path length, should scale similarly. If optical depth indeed reduces proportionally with drive laser wavelength, the step to a 2-\textmu m laser system could be particularly beneficial. In the following, we perform an analysis of the optical depth associated with the EUV spectra by varying plasma size following the work of Schupp \textit{et al.}\,\cite{Schupp2019b}. This is accomplished by irradiating droplets having diameters in the range 16--51\,\textmu m. \newpage \subsection{Scaling of peak optical depth with droplet size \\ and drive laser wavelength: examples} In our experiments the droplet diameter is changed in controlled steps from 16 to \SI{51}{\micro\meter} and a constant laser intensity is used for both laser wavelength cases. First, droplets are illuminated with 2-\textmu m laser light with an intensity of \SI{1.1E11}{\intensity}, close to optimal SP. The spot size is 65x88\,\textmu m. In Fig.\,\ref{fig:temp5} spectra for the smallest and largest droplet diameter are shown for both drive laser cases. With increasing droplet diameter the main emission feature at 13.5\,nm widens and more intense short wavelength radiation is emitted relative to the 13.5-nm peak. Second, the same scan is repeated with 1-\textmu m laser light at \SI{2.4E11}{\intensity}, an intensity chosen based on the intensity ratio in Fig.\,\ref{fig:temp2}(c). Again, the main emission feature at 13.5\,nm widens with increasing droplet diameter and more intense short wavelength radiation is emitted relative to the 13.5-nm peak. For the 1-\textmu m driver these effects however are much stronger. \begin{figure}[tb] \centering \includegraphics[scale=1]{droplet_size_MOPA_YAG.pdf} \caption{Spectral emission from tin plasmas produced with 1- and 2-\textmu m laser wavelength for small and large droplet diameters at laser intensities of 2.4 and \SI{1.1e11}{\intensity}, respectively.} \label{fig:temp5} \end{figure} In the following, the spectra are analyzed regarding their optical depth similar to the analysis in Ref.\,\onlinecite{Schupp2019b}. The wavelength-dependent optical depth $\tau_\lambda := \int \kappa_\lambda \rho dx$ is defined as the spatial integration over the product of the plasma's opacity $\kappa_\lambda$ and mass density $\rho$. In the instructive case of a one-dimensional plasma \cite{Bakshi2006} in local thermodynamic equilibrium (LTE), the spectral radiance is given by $L_\lambda = B_\lambda \left( 1 - e^{- \tau_{\lambda} } \right)$, where $B_\lambda$ is the Planck blackbody spectral radiance. We note that our high-density, strongly collisional 1- and 2-\textmu m driven plasmas are reasonably well approximated by LTE \cite{Torretti2020prominent}. At equal temperatures, and thus average charge state (recall $\bar{z}\approx 22.5 T^{0.6}$ \cite{Basko2015}), this equation enables each measured spectrum $\sim L_{\lambda,i}$ to be well approximated by any other spectrum $\sim L_{\lambda,j}$ when taking into account the ratio of the corresponding peak optical depths $a=\tau_{p,i}/\tau_{p,j}$ as a single parameter independent of wavelength (see Ref.\,\cite{Schupp2019b} and the Appendix for further details). Subsequently, if any peak optical depth $\tau_{p,j}$ is known in absolute terms, the optical depth of any other spectrum can be deduced. To be able to correct for systematic errors that could possibly occur for relatively low optical depth $\tau \lesssim 1$ we have suitably modified the equation used in Ref.\,\cite{Schupp2019b} as is detailed in the Appendix. As a reference spectrum, the spectrum measured at 1-\textmu m laser wavelength, 10-ns pulse duration and 30-\textmu m droplet size is chosen. The peak optical depth of this spectrum is determined by comparison of its 13.5-nm feature to opacity calculations in Ref.\,\cite{Torretti2020prominent}. More specifically, radiation transport is applied to the opacity spectrum calculated in Ref.\,\cite{Torretti2020prominent} for a here relevant mass density of $\rho=\SI{0.002}{g/cm^3}$ and electron temperature of $T_e=32$\,eV. The difference between radiation transported opacity spectrum and experimental spectrum is then minimized by changing the optical depth parameter $\tau_p$ in a least-square fit routine. This procedure leads to an absolute peak optical depth of $\tau_{0,p} = 4.5$ for our reference spectrum. \begin{figure}[tb] \centering \includegraphics[scale=1]{radiation_transport_scan4_30um_droplet.pdf} \caption{Spectrum produced with 2-\textmu m laser light (red line) compared to the radiation-transported reference spectrum for a peak optical depth value of $\tau_{p}=2.2$ (gray line, barely distinguishable from the red line). Reference and 2-\textmu m driven spectra were both obtained using a droplet diameter of 30\,\textmu m. Also shown is a spectrum obtained using a 10-\textmu m CO$_2$ laser \cite{Kerkhof2020} that represents the case of small optical depth. } \label{fig:temp3} \end{figure} Using Eq.\,\eqref{eqn:fit function_corrected} the peak optical depth $\tau_{i,p}$ of all spectra is fitted with respect to the reference spectrum. As expected, inserting the relative optical depth obtained from the fits into Eq.\,\eqref{eqn:fit function} leads to an excellent reproduction of the main emission feature, as is shown in Fig.\,\ref{fig:temp3} for a typical example spectrum (30-\textmu m droplet with a 2-\textmu m driver). A further reasonable reproduction of the 7 to 12\,nm features is established with the 2-\textmu m driver outperforming the model spectrum with respect to the amount of radiation emitted out-of-band. Fig.\,\ref{fig:temp3} also shows a spectrum from an industrial plasma produced by a 10-\textmu m CO$_2$ driver which represents the limiting case of low optical depth. The step from a 1-\textmu m to a 2-\textmu m driver clearly significantly enhances the spectrum. \subsection{Scaling of peak optical depth with droplet size \\ and drive laser wavelength: all results} Having demonstrated the ability of the model function to accurately reproduce spectra from a single reference spectrum, we show in Fig.\,\ref{fig:temp4}(a) the fitted values for all spectra of the droplet size scans for 1- and 2-\textmu m laser wavelength. In all cases the peak optical depth $ \tau_{i,p} $ appears to linearly increase with droplet diameter and to strongly depend on the laser wavelength. Indeed, the peak optical depth of the 2-\textmu m driven plasma lies roughly a factor of 2 below that of the 1-\textmu m one at largest droplet size, which may be expected from the lower plasma density (cf. Section\,\ref{sec:spectralscaling}). However, the 1-\textmu m results were obtained with 10-ns-long pulses and are here compared to the results from $\sim 5$-ns long, 2-\textmu m pulses, and optical depth is known to increase with pulse length \cite{Schupp2019,Schupp2019b}. To provide a comparison on more equal footing, we further compare in Fig.\,\ref{fig:temp4}(a) our results to previous data \cite{Schupp2019b}, obtained using a 1-\textmu m wavelength laser with a 5\,ns temporally box-shaped laser pulse. One of these data sets is taken with a spatially flattop laser profile of 96-\textmu m diameter \cite{Schupp2019,Schupp2019b} while the other one is taken with a Gaussian laser beam profile of 66\,\textmu m FWHM which more closely resembles the experimental conditions for the 2-\textmu m driver case. The spatial intensity distribution of the 1-\textmu m laser beam is seen to impact the effective optical depth (see also Ref.\,\cite{Schupp2019}). On comparison of the spectra for the 2- and 1-\textmu m cases at the most comparable temporal and spatial beam conditions, the clear reduction in peak optical depth parameter is maintained. This reduction, up to a factor 1.6 in optical depth becomes more pronounced at larger droplet diameters. The small deviation from the factor of $\sim$2 from the $\rho \sim \lambda^{-1}$ scaling may originate from differences in plasma length scales, plasma temperature, or from the finite laser intensity gradient over the plasma length scale. Nevertheless, a very significant reduction in optical depth of up to 40\,\% is demonstrated when using a 2-\textmu m laser to drive the plasma. \\ \begin{figure}[!tb] \centering \includegraphics[scale=1]{optical_depth_QR_base_with_SNS201811_v2.pdf} \caption{(a) Dependency of peak optical depth $ \tau_{i,p} $ on droplet diameter for 5- and 10-ns laser pulse duration at 1-\textmu m wavelength and for 4.3-ns pulse duration at 2-\textmu m wavelength. Circles indicate Gaussian spatial laser profile and boxes indicate a homogeneous 'flattop' laser beam profile. Peak optical depth is fitted with respect to the spectrum obtained at 1-\textmu m wavelength, 10-ns pulse duration and 30-\textmu m droplet diameter with optical depth of $\tau_{0,p}=4.5$. (b) Experimental values for spectral purity (SP) versus peak optical depth. The dashed line represents SP as calculated from the radiation-transported reference spectrum. The diamond symbol indicates the SP value of the radiation-transported reference spectrum for a peak optical depth value $\tau_{i,p}=0.4$, obtained from comparison of the reference spectrum with the emission of the CO$_2$-laser-driven plasma spectrum illustrated in Fig.\,\ref{fig:temp5}. } \label{fig:temp4} \end{figure} With peak optical depth being the pertinent scaling parameter of 1- and 2-\textmu m driven tin plasmas the corresponding spectral purity of the emission spectrum is related to it in Fig.\,\ref{fig:temp4}(b). All experimental SP values, calculated over the range of 5.5--\SI{25.5}{nm}, collapse onto the gray dashed curve obtained by calculating the SP of the radiation-transported reference spectrum. The 2-\textmu m case is slightly offset towards higher SP values because of the reduced emission in the 7 to 12\,nm wavelength band compared to the radiation transported reference spectrum (cf. Fig.\,\ref{fig:temp3}) that is not captured by the model with the same accuracy as that of the main emission feature at 13.5\,nm. This difference between model and experiment may point to a small overestimation of the optical depth of the 2-\textmu m-laser-produced tin plasma, which would explain both the observed overestimation of the short-wavelength out-of-band emission by the model as well as the offset in Fig.\,\ref{fig:temp4}(b). This small overestimation of the optical depth may in turn be due to a broader charge state distribution in our measurements of the 2-\textmu m case caused by, e.g., laser intensity gradients or the slightly lower beam pointing stability compared to the 1-\textmu m case. This observation leads us to expect an even lower optical depth in the 2-\textmu m case and brings our scaling ratio even closer to the expected factor 2 from $~\lambda^{-1}$ scaling. More importantly, it indicates that there are further opportunities for narrowing the charge state distribution by providing a more homogeneous heating of the plasma in time and space. Such a narrowing of the charge state distribution around the optimum charge states Sn$^{11+}$--Sn$^{14+}$ would lead to further improvements of SP and thus CE. \section{Conclusions} In conclusion, the effects of optical depth, plasma density, and laser intensity on the emission spectra of a 2-\textmu m-LPP source of tin microdroplets are investigated. The results are compared to the case of a 1-\textmu m driven plasma. It is found that the laser intensity required to maintain a common plasma temperature, scales approximately inversely with laser wavelength in going from 1- to 2-\textmu m drive laser, a result that will help defining development goals for future 2-\textmu m drive lasers for LPP light sources. The reciprocal scaling with laser wavelength ($\sim\lambda^{-1}$) has its origin in Kramers' law of inverse Bremsstrahlung, the main laser absorption mechanism in the tin plasmas investigated. Because of its reduced plasma density, the optical depth of the 2-\textmu m driven plasma is significantly reduced, allowing for efficient out-coupling of 13.5-nm radiation from the plasma even at larger plasma sizes. In future experiments it will be of interest to use large, pre-deformed targets and investigate the full CE potential of a 2-\textmu m source in a setting more similar to the current industrial one. Our results indicate that there are further opportunities for narrowing the charge state distribution by providing a more homogeneous heating of the plasma in time and space which would lead to further improvements of SP and thus CE. Looking further, it is of interest to experimentally investigate plasma generation using even longer-wavelength laser systems between 2 and 10\,\textmu m to find the mid-infrared wavelength optimally suited to drive EUV light sources at 13.5\,nm.\\ \section*{Acknowledgements} We thank Mikhail M. Basko for providing us with the RALEF-2D code and his advise aiding the simulation work presented in the paper. Further we thank the authors of Ref.\,\cite{Kerkhof2020} for providing us with the data for the CO$_2$ spectrum shown in Fig.\,\ref{fig:temp3}. This work has been carried out at the Advanced Research Center for Nanolithography (ARCNL), a public-private partnership of the University of Amsterdam (UvA), the Vrije Universiteit Amsterdam (VU), the Netherlands Organisation for Scientific Research (NWO) and the semiconductor equipment manufacturer ASML. The used transmission grating spectrometer has been developed in the Industrial Focus Group XUV Optics at University of Twente, and supported by the FOM Valorisation Prize 2011 awarded to F. Bijkerk and NanoNextNL Valorization Grant awarded to M. Bayraktar in 2015. This project has received funding from European Research Council (ERC) Starting Grant number 802648 and is part of the VIDI research programme with project number 15697, which is financed by NWO. \section*{References} \bibliographystyle{apsrev4-2} \input{main.bbl} \newpage \begin{appendix} \section*{Appendix} \subsection*{Radiation transport model} To determine peak optical depth in this work, the recorded spectra are analyzed in a manner similar to that presented in Ref.\,\onlinecite{Schupp2019b}. In the following, the method from Ref.\,\onlinecite{Schupp2019b} is first outlined briefly and is subsequently generalized for use with plasmas that are optically thin. The wavelength-dependent optical depth $\tau_\lambda := \int \kappa_\lambda \rho dx$ is defined as the spatial integration over the product of the plasma's opacity $\kappa_\lambda$ and mass density density $\rho$. The spectral radiance $L_\lambda$ of an extended one-dimensional plasma can be calculated by means of its optical depth as \cite{Bakshi2006} \begin{equation} \label{eqn:radiation transport} L_\lambda = S_\lambda \left( 1 - e^{- \tau_{\lambda} } \right). \end{equation} In local thermodynamic equilibrium (LTE), where collisional processes drive atomic level populations, the source function $S_\lambda$ equals the Planck blackbody function $B_\lambda$. Rearranging Eq.\,\eqref{eqn:radiation transport}, the optical depth of the recorded plasma spectrum can be obtained from its relative spectral radiance ${L_\lambda}/{B_\lambda}$ \begin{equation} \label{eqn:optical depth} \tau_\lambda = -\ln \left( 1 - \frac{L_\lambda}{B_\lambda} \right). \end{equation} The optical depths of two plasmas of similar temperatures, but with modestly different densities and length scales, may differ (in first approximation) only by a single wavelength-independent multiplicative factor $a_i$, relating the plasmas' optical depths via $\tau_{\lambda,i} = a_i \, \tau_{\lambda,0}$. Here $\tau_{0}$ and $\tau_{i}$ are the two wavelength-dependent optical depths of the reference spectrum and any other spectrum $i$, respectively. The relative spectral radiances of these two plasmas can be related to each other via Eq.\,\eqref{eqn:optical depth} \begin{equation} \label{eqn:fit function} \frac{L_{\lambda,i}}{B_{\lambda}} = 1 - \left( 1 - \frac{L_{\lambda,0}}{B_{\lambda}} \right)^{\tau_{i}/\tau_{0}}. \end{equation} In order to apply Eq.\,\eqref{eqn:fit function} to the spectra measured, the relative spectral radiance of the spectra must be known. To obtain the relative spectral radiance, the ratio of observed spectrum $O_{\lambda}$ (meaning the spectrum as recorded with the spectrometer) and blackbody function is normalized to the peak value at 13.5-nm wavelength (subscript $p$) by replacing $L$ with $\Tilde{L}_{\lambda} = O_{\lambda} B_{p} / O_{p}$. The normalized ratio $\Tilde{L}_{\lambda}/B_{\lambda}$ is then multiplied by the amplitude factor $1-e^{-\tau_{p}}$ obtained from Eq.\,\eqref{eqn:optical depth} \begin{equation} \label{eqn:fit function_corrected} \frac{\Tilde{L}_{\lambda,i}}{B_{\lambda}} = \frac{ 1 - \left( 1 - \frac{\Tilde{L}_{\lambda,0}}{B_{\lambda}} (1-e^{-\tau_{0,p}}) \right)^{\tau_{i,p}/\tau_{0,p}} } { 1-e^{-\tau_{i,p}} }. \end{equation} Note that the wavelength-dependent optical depth values ($\tau_{0,\lambda}$) from Eq.\,\eqref{eqn:fit function} have been exchanged by their peak values ($\tau_{0,p}$). This generalized equation allows for determination of peak optical depth in optically thin plasmas in LTE if the peak optical depth of one of the spectra is known. In the current analysis the use of Eq.\,\eqref{eqn:fit function_corrected} results in optical depth values that are mostly very similar, but some of which are up to 25\,\% lower for the smallest optical depths cases ($\tau \sim 2$), than when using Eq.\,\eqref{eqn:fit function}. Using Eq.\,\eqref{eqn:fit function_corrected} the peak optical depths $\tau_{i,p}$ of all spectra are fitted with respect to a reference spectrum of known peak optical depth (see main text). \end{appendix} \end{document} \section{Introduction} Laser-driven microdroplet-tin plasma provides the extreme-ultraviolet (EUV) light that is used in state-of-the-art EUV lithography\,\cite{versolato2019physics,Purvis2018industrialization,Moore2018euv,Schafgans2015performance,OSullivan2015,Banine2011,Benschop2008}. Ever more powerful sources of EUV light are required for future lithography applications. This EUV light is generated from electronic transitions in multiply-charged tin ions that strongly emit radiation in a narrow band around 13.5\,nm\,\cite{Azarov1993,Churilov2006SnIX--SnXII,Churilov2006SnVIII,Churilov2006SnXIII--XV,Ryabtsev2008SnXIV,Tolstikhina2006ATOMICDATA,DArcy2009a,Ohashi2010,Colgan2017,Torretti2017,Scheers2020}. EUV-emitting plasma in an industrial nanolithography machine is driven by CO$_2$-gas lasers with a 10-\textmu m wavelength. Such plasma achieves particularly high conversion efficiencies (CE) of converting drive laser light into EUV radiation in a 2-\% wavelength bandwidth around 13.5\,nm that can be transported by the available Mo/Si multilayer optics\,\cite{Bajt2002,Huang2017}. Near- or mid-infrared solid-state lasers may however soon become an attractive alternative to the CO$_2$-gas lasers because such modern solid-state lasers are expected to have a significantly higher efficiency in converting electrical power to laser light. Furthermore, they may reach much higher pulse energies and output powers, in turn enabling more EUV output. Big Aperture Thulium (BAT) lasers\,\cite{Danson2019petawatt,Sistrunk2019} represent a particularly promising class of novel, powerful laser systems that has recently drawn significant attention. These lasers would operate at 1.9-\textmu m wavelength, in between the well-known cases of 1- and 10-\textmu m drive lasers. Recent simulation work indicates that a global CE optimum lies within this range of 1- and 10-\textmu m drive laser wavelength\,\cite{Siders2019euvlitho}. Briefly, such studies point out that the longer-wavelength drivers are associated with sub-optimal absorption of the laser energy by the plasma whereas shorter-wavelength drivers may exhibit severe opacity broadening of the EUV spectrum out of the 2-\% acceptance bandwidth \cite{Schupp2019b,Freeman2012laser,Harilal2011effect}. To date, no experimental studies of mass-limited, microdroplet-tin-based plasmas driven by lasers in this wavelength range are however available to verify these claims. In this article a study of the EUV emission spectrum of 2-\textmu m-wavelength-laser-driven tin-microdroplet plasma is presented. The laser light is obtained from a master oscillator power amplifier setup that comprises a series of KTP crystals pumped by a ns-pulsed Nd:YAG laser ($\lambda=1$\,\textmu m), enabling to gauge the potential of, e.g., thulium lasers without the effort of building one. The recorded spectroscopic data are compared to those obtained from a 1-\textmu m-driven plasma under otherwise identical conditions, over a wide range of droplet sizes and laser intensities. Radiation-hydrodynamic simulations using the RALEF-2D code \cite{Basko2010development}, are presented to support the experimental findings. Following the recent work of Schupp \textit{et al}.\,\cite{Schupp2019b} on Nd:YAG-laser-pumped plasma, an analytical solution for radiation transport in an optically thick one-dimensional plasma is used to quantify the influence of optical depth on the broadening of the key emission feature at 13.5\,nm. \section{Experiment} In the first set of experiments micrometer-sized liquid tin droplets are irradiated with high-intensity 2-\textmu m-wavelength laser pulses produced in a master oscillator power amplifier (MOPA). Following the work of Arisholm \textit{et al.}\,\cite{Arisholm2004}, the MOPA consists of a singly resonant optical parametric oscillator (OPO) in collinear alignment followed by an optical parametric amplifier (OPA). The latter comprises two 18-mm long KTP crystals operated in type II phase matching. The setup (see Fig.\,\ref{fig:temp1}) is pumped by a seeded Nd:YAG laser with a spatially flat-top and a temporally Gaussian profile of 10\,ns (FWHM). The OPO is pumped with 18\,mJ within a 1.5-mm diameter beam resulting in an idler beam energy of 1.8\,mJ at a wavelength of 2.17\,\textmu m. The OPO is operated slightly off its degeneracy point to minimize back conversion of signal and idler into the pump wavelength, a process which reduces beam quality of both beams. After the OPO the signal beam is removed and the idler beam expanded to 11\,mm and amplified in the OPA. Using 1.3\,J of pump energy within a beam diameter of 10\,mm, 260\,mJ of 2-\,\textmu m radiation are obtained, summing signal and idler pulse energies. The pulse duration of both beams after amplification is 4.3\,ns. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{MOPA_layout_essentials_arisholm_layout_solid_target_v2.pdf} \caption{Schematic representation of the experimental setup. A master oscillator power amplifier (MOPA) setup, comprising an optical parametric oscillator (OPO) and an optical parametric amplifier (OPA), is pumped by a Nd:YAG laser (blue line). The signal beam is separated via polarization optics and the idler beam ($\lambda=$2.17\,\textmu m) is focused onto tin microdroplets within a vacuum chamber. EUV emission is captured by a transmission grating spectrometer positioned at \SI{60}{\degree} with respect to the laser axis. An additional, third KTP crystal (dashed outline) was used in the OPA in a subset of the experiments.} \label{fig:temp1} \end{figure} For the experiments the signal beam is removed via polarization optics and the idler beam is solely used. The idler beam is focused onto several ten-micrometer-sized liquid tin droplets created via coalescence of even smaller microdroplets from a tin jet in a vacuum chamber that is kept at or below $10^{-6}$\,mbar. The diameter of the microdroplets is adjustable within a range from 16--51\,\textmu m. The focal spot is elliptical and has a size of 65x88\,\textmu m (FWHM) and laser intensities of up to \SI{2.1E11}{\intensity} are obtained on the tin droplets. Data taken with this 2-crystal setup is used for Sec.\,\ref{sec:depthscaling} and is part of the data in Fig.\ref{fig:temp2}(c). The intensity is defined as peak intensity in time and space and calculated to $I_L=(2\sqrt{2\ln{2}/2\pi})^3 E_L/ab t_p$ with laser energy $E_L$, FWHMs $a$ and $b$ along the major and minor axis of the bivariate Gaussian and pulse duration $t_p$. The energy in the beam is adjusted by the combination of a half-waveplate and polarizer. % The data displayed in Fig.\,\ref{fig:temp2}(a) was taken in a later experiment and after installation of a third crystal in the OPA which increased the energy in signal and idler combined to 360\,mJ while the pulse duration increased slightly to 4.7(3)\,ns (FWHM). The produced beam has a symmetric focal spot and measurements are obtained for three focal spot sizes of 106, 152 and 194\,\textmu m (FWHM) that are obtained using lenses of different focal distance length. The data obtained in the first and this later experiment is combined in Fig.\,\ref{fig:temp2}(c). To enable a direct comparison with plasmas driven by 1-\textmu m wavelength laser pulses, light from the 1-\textmu m pump laser is redirected before entering the MOPA and is focused onto the tin droplets instead. Again, a combination of a half-wave plate and polarizer allows for adjustment of the beam energy. The focal spot has a symmetric Gaussian shape of 86\,\textmu m (FWHM). % The EUV emission from the tin plasma is collected by a transmission grating spectrometer \cite{Bayraktar2016broadband} set up under a \SI{60}{\degree} angle with respect to the incoming laser beam. The spectrometer was operated with a 10,000\,lines/mm grating, a 25-\textmu m slit and without filter. The measured spectra are corrected for the grating's first and second order diffraction efficiency as well as for the quantum efficiency of the camera. The wavelength is calibrated in a separate experiment using atomic line emission from an aluminum plasma. % Spectral purity (SP), defined as the ratio of spectral energy in a 2\% bandwidth around 13.5\,nm to the total EUV energy, is used to characterize the EUV light source. All SP values provided are calculated with respect to the measured spectral range of 5.5--\SI{25.5}{nm}. \begin{figure}[tb] \centering \includegraphics[scale=1]{intensity_scan.pdf} \caption{Spectra from tin droplet plasma observed at various intensities of the (a) 2-\textmu m beam (4.7\,ns pulse duration, 106\,\textmu m FWHM, 3 KTP crystals) and the (b) 1-\textmu m Nd:YAG beam (10\,ns pulse duration, 86\,\textmu m FWHM). The droplet size in both cases is 30\,\textmu m. (c) Ratio of the intensities of 1- and 2-\textmu m drive laser beams needed to obtain spectra with similar spectral features. The data points represent the average intensity ratios from data taken with four different laser spot sizes of the 2\,\textmu m laser beam of 65x88, 106, 152 and 194\,\textmu m (FWHM), respectively. The error bars indicate the standard deviation per measurement. The red line represents the average over all data points and the shaded band the standard deviation of the average.} \label{fig:temp2} \end{figure} \section{Scaling of spectral features with laser intensity and wavelength} \label{sec:spectralscaling} For defining development targets regarding power and pulse energy of future 2-\textmu m lasers for use in EUV light sources, it is particularly relevant to know the laser intensity needed to obtain a tin charge state balance optimal for the production of 13.5-nm light. In this section the laser intensity on the tin droplet is scanned and the optimal laser intensity determined as the value at which SP is highest, given that SP is the ultimate limit of CE as follows from energy conservation CE$<$SP/2 for isotropic emission\,\cite{Schupp2019}. To better understand the relevant plasma temperatures and densities, we study the ratio of 1- and 2-\textmu m laser intensities at which plasmas of equal temperatures are established. Plasma temperature is experimentally established via the shape and amplitude of charge-state-specific spectral emission features \cite{Svendsen1994,Torretti2018,torretti2019spectral,Bouza2020}. These features are indicative of the plasma's charge state distribution which is predominantly dependent on plasma temperature\,\cite{Basko2015}. The experimental results are then compared to computer simulations using the radiation-hydrodynamic code RALEF-2D as well as to previous analytic work \cite{Basko2015}. \subsection{Spectral dependencies on drive laser intensity} In the experiments, first the idler beam from the MOPA is focused onto a 30-\textmu m diameter droplet and spectra are measured using the 106-\textmu m spot size at multiple intensities within a range of 0.1--\SI{2.2}{\intensity} (see Fig.\,\ref{fig:temp2}(a)). At the lowest laser intensity the plasma strongly emits around 14.5\,nm and distinct $4d$--$4f$ transitions in Sn$^{6+}$ are visible around 17\,nm \cite{Bouza2020}. Emission between 18 and 20\,nm can be mainly attributed to Sn$^{5+}$. At 15.7\,nm, a strong emission feature from $4d$--$4f$ and $4p$--$4d$ transitions in Sn$^{7+}$ is visible. Going up this \q{ladder} of charge states, emission from $4d$--$4f$ and $4p$--$4d$ transitions in Sn$^{8+}$ is visible at 14.8\,nm and from Sn$^{9+}$ at 14.2\,nm. With increasing laser intensity the average charge state of the plasma increases and emission from Sn$^{10+}$ is evident in the 9.5--10-nm region\,\cite{Torretti2018}. Increasing laser intensity beyond \SI{E11}{\intensity}, the plasma strongly emits at 13.5\,nm. This emission originates from the $4d$--$4f$, $4d$--$5p$ and $4p$--$4d$ unresolved transitions arrays (UTAs) in Sn$^{8+}$ to Sn$^{14+}$ \cite{OSullivan2015, Churilov2006SnIX--SnXII}. With the strong emission at 13.5\,nm, charge state specific features become visible between 7 and 12\,nm. These features belong to the same Sn$^{8+}$ to Sn$^{14+}$ ions and here the $4d$--$5f$, $4d$--$6p$ and $4p$--$5s$ transitions contribute strongest \cite{Svendsen1994,Torretti2018}. With increasing laser intensity SP rises to values of 15\,\% at \SI{0.8e11}{\intensity} where charge state balance is optimal for in-band EUV emission, before reducing again at even higher intensity values (see inset in Fig.\,\ref{fig:temp2}(b)). Second, plasma is created using laser light of 1-\textmu m wavelength. Spectra for laser intensities within the range of 0.3--\SI{4.4e11}{\intensity} are shown in Fig.\,\ref{fig:temp2}(b). When compared to the 2-\textmu m drive-laser case the spectra show very similar shape, albeit at an apparent increased overall width. Again the same emission features of charge states Sn$^{5+}$ to Sn$^{9+}$ are visible at the lowest laser intensity but with somewhat less prominent emission features. This reduction in prominence is particularly noticeable for the peaks of charge states Sn$^{6+}$ and Sn$^{7+}$ (between 14 and 16\,nm). Further the Sn$^{9+}$ peak at 14.2\,nm is hardly visible (cf. \SI{0.2E11}{\intensity} in the 2-\textmu m case). The SP rises until it reaches values of 9.7\,\% around \SI{2E11}{\intensity} and subsequently decreases as the charge state balance becomes sub-optimal for emission of 13.5-nm light. The peak intensities used in this work agree well with previously published work, where the optimal SP was found at an intensity of \SI{1.4E11}{\intensity} using a temporally and spatially box-like laser profile to illuminate the tin droplets \cite{Schupp2019}. The higher intensity value found in this work is attributed to the fact that, because of their spatial extent, the droplets experience a slightly lower average intensity compared to the peak values stated. To obtain the sought-for laser-intensity ratio $I_{1\mu m}/I_{2\mu m}$, each spectrum of the 2-\textmu m laser case at intensity $I_{2\mu m}$ is matched to a spectrum of the 1-\textmu m case at intensity $I_{1\mu m}$ for which the resemblance of the relative amplitudes and shape of spectral features is best matching. As the spectral features are characteristic of individual tin charge states \cite{torretti2019spectral, Bouza2020} this comparison provides access to the scaling of the plasma's charge state distribution (and hence temperature) with laser wavelength. For each match of laser intensities the ratio $I_{1\mu m}/I_{2\mu m}$ is calculated and plotted as a function of $I_{1\mu m}$ in Fig.\,\ref{fig:temp2}(c). The data points represent the average of comparisons made for multiple spot size conditions and for two droplet size conditions. In all cases spectra were compared to the ones taken with the 1-\textmu m wavelength laser beam size of 86\,\textmu m. More specifically, the comparison encompasses measurements with a 30-\textmu m diameter droplet for 2-\textmu m case beam sizes of 65x88, 106x106, 152x152 and 194x194\,\textmu m and on a 19-\textmu m diameter droplet for the 65x88-\textmu m beam. The red line shows the average $I_{1\mu m}/I_{2\mu m}=2.1(6)$ of all measurements with the standard deviation (distribution width and not the error-on-the-mean) of the mean value as red shaded area. The depicted uncertainty is the standard deviation of the mean. \subsection{Theory and discussion} The temperature of a plasma can be expressed analytically if the equation of state (EOS) is sufficiently well known. The required EOS parameters will however depend on the location in the plasma where the laser light is absorbed. Two cases can be distinguished\,\cite{Basko2015}. Case I: absorption of laser light dominantly occurs close to the critical surface where the plasma's electron density equals the critical density ($n_e\approx n_{crit}\sim\lambda^{-2}$). This case is relevant for long wavelength laser light, e.g., from CO$_2$ lasers. Case II: absorption is already significant in the underdense corona where the electron density is lower than the critical electron density. For laser absorption of 1- and 2-\textmu m beams, case II applies and the tin plasma temperature can be written as \cite{Basko2015} \begin{equation} \label{eqn:Basko_T} T \propto \left( \frac{1}{R\lambda^2} \right)^{-0.19} [I (1-\phi_r)]^{0.44}, \end{equation} with laser wavelength $\lambda$, laser intensity $I$, radiative loss fraction $\phi_r$ of the plasma and characteristic radius of the sonic surface $R$, defined as the contour at which the ion velocity equals the local sound velocity. The numerical values for the powers -0.19 and 0.44 originate from the EOS\,\cite{Basko2015}. Differences in radiative losses of the plasmas are neglected in the following, as they may be small for similar density and temperature plasmas. The sonic surface $R$ is only slightly wavelength dependent and the small difference can be neglected. From Eq.\,\eqref{eqn:Basko_T}, an intensity ratio $I_{i}/I_{j}=(\lambda_{j}/\lambda_{i})^{0.86}$ here $I_{1\mu m}/I_{2\mu m}=1.8$ is calculated for $\lambda=1$ and 2-\textmu m plasmas exhibiting equal plasma temperatures. The predicted ratio of 1.8 agrees well with the experimental one of 2.1(6) and well approximates a scaling with $\lambda^{-1}$. \begin{figure} \centering \includegraphics{RALEF_maxTemp.pdf} \caption{Top: maximum temperature of a tin plasma for various laser intensities calculated with the two-dimensional-radiation transport code RALEF-2D. A 30-\textmu m diameter droplet is illuminated with temporally and spatially Gaussian-shaped laser pulses of wavelengths 1 and 2\,\textmu m. Center: temperature and electron density lineout along the axis of the incoming laser beam. Bottom: frequency-integrated local radiation field intensity $I_{rad}$ of the plasma and its normalized derivative $dI_{rad}$. The radiation field intensity is calculated from Eq\,\eqref{eq:radiation-field-intensity} using the density and temperature lineouts depicted in the center panel. For more detail see text.} \label{fig:temp6} \end{figure} Alongside this analytical approach, the radiation hydrodynamic code RALEF-2D \cite{Basko2017ralef} is used to determine the laser intensity ratio yielding equivalent plasma temperatures. RALEF-2D was developed to simulate laser plasma interaction and solves the equations of fluid dynamics in two dimensions (assuming cylindrical symmetry around the laser beam propagation axis) while including necessary physical mechanisms such as laser absorption, thermal conduction and radiation transport. The latter is needed for accurate predictions of a strongly radiating plasma, which is true for the current case. An extensive set of simulations has been performed at conditions close to the experimental ones. A 30-\textmu m diameter droplet is irradiated by temporally and spatially Gaussian beams. The 1- and 2-\textmu m beams have pulse durations of 10 and 4.3\,ns (FWHM) and sizes of 80 and 100\,\textmu m (FWHM), respectively. Laser intensities in the range spanning \num{E10} to \SI{E12}{\intensity} are simulated. The plasma's peak temperature is plotted in Fig.\,\ref{fig:temp6}. For a given laser intensities the maximum temperature is consistently higher in the 2-\textmu m case. We note that the different pulse durations (10 vs. 4.3\,ns) have a minimal impact on temperature and density scales. The maximum temperatures are seen to follow Eq.\,\eqref{eqn:Basko_T} fitted as $T[\textrm{eV}] = a \, \lambda^{0.38}[\textrm{\textmu m}] \, I^{0.44}[\SI{E11}{\intensity}]$, where a common amplitude $a=43$ is determined by a global fit to all data. Eq.\,\eqref{eqn:Basko_T} captures the scaling of the peak plasma temperature over two decades in laser intensity. Further shown in Fig.\,\ref{fig:temp6} are temperature and electron density lineouts along the laser axis away from the droplet at intensities relevant for the efficient emission of EUV light. The intensity of the 1- and 2-\textmu m cases were chosen to have nearly identical peak electron temperature. This temperature strongly increases with distance from the droplet surface and peaks around 11\,\textmu m from the droplet surface before it reduces again at larger distances. The maximum temperature is obtained at a factor of 2.0 lower density in the 2-\textmu m case. The point of highest temperature is much closer to the critical density in the 2-\textmu m case indicating that the absorption of laser light occurs closer to critical density while the conditions for laser absorption of case II are still met. Following Ref.\,\cite{Basko2015}, and references therein, the scaling of the relevant plasma electron density with wavelength can also be approximated invoking a constant absorbed fraction of the laser light, $k_L R$\,=\,constant. Inserting the Kramers' absorption coefficient for the laser radiation $k_L$ we obtain \cite{Basko2015,Oster1961emission} \begin{equation} \label{eq:Basko_coronal_abs_cond} (R \lambda^2) \rho^2 \bar{z}^3 T^{-3/2} = \mathrm{constant}, \end{equation} with the mass density $\rho$ and the plasma's average charge state $\bar{z}$. Considering that mass density $\rho$ and ion density $n_i$ follow the ratio of electron density and average charge state $\rho \sim n_i=n_e/\bar{z}$, where $\bar{z}\approx 22.5 T^{0.6}$ \cite{Basko2015}, it becomes clear that the ratio of the electron densities lineouts displayed well approximates the ratio of mass density between the two laser wavelength cases. All other factors remaining constant in Eq.\,\eqref{eq:Basko_coronal_abs_cond}, a reciprocal scaling of mass density $\rho$ and wavelength $\lambda$ becomes directly apparent. The difference in mass density can thus be attributed to the difference in absorptivity of the laser radiation from Kramers' law\cite{Kramers1923}. This inversely proportional scaling of density with wavelength is the root cause of the observed intensity ratio. The bottom panel of Fig.\,\ref{fig:temp6} shows the radiation field intensity $I_{rad}$ and its normalized derivative $dI_{rad}$. The frequency-integrated radiation field intensity is calculated from \begin{equation} \label{eq:radiation-field-intensity} I_{rad}(s) = I_0 e ^{-\int^{s}_{s0} \alpha (s')ds'} +\int^{s}_{s0} \alpha (s') B(s') e^{-\int^{s}_{s'} \alpha (s'')ds''} ds' \end{equation} with the Planck mean absorptivity $\alpha_p[\mathrm{m}^{-1}] = \num{3.3E-7} \cdot \rho[\mathrm{g/cm}^{3}] \cdot T^{-1}[\mathrm{eV}]$ using the temperature and electron density information in Fig.\,\ref{fig:temp6}. For more information see Ref.\,\cite{Torretti2020prominent}. The normalized derivatives $dI_{rad}$ peak at 6.5 and 8\,\textmu m distance from the droplet surface for the 1- and 2-\textmu m cases, respectively. They show that the typical length scales of emission are similar in both wavelength cases. The point of largest change in radiation field intensity is located slightly closer to the droplet surface than the point of maximum temperature. The significantly higher density more than compensates for the drop in temperature. The point of largest change in the radiation field intensity of the 1-\textmu m driven plasma occurs relatively far from the critical density, whereas in the 2-\textmu m driven plasma this point lies close to the critical density, an observation explained by the distances between the respective maximum temperatures and critical densities. The radiation field intensity at large distances from the droplet surface is approximately a factor of two higher in the 1-\textmu m case because of the factor of two higher (emitter) density compared to the 2-\textmu m case. \section{Scaling of optical depth \label{sec:depthscaling} The scaling of mass density with drive laser wavelength $\rho \sim \lambda^{-1}$ at similar length scales, as established by our simulations, indicates that the optical depth of the plasma, being a product of atomic opacity, mass density and path length, should scale similarly. If optical depth indeed reduces proportionally with drive laser wavelength, the step to a 2-\textmu m laser system could be particularly beneficial. In the following, we perform an analysis of the optical depth associated with the EUV spectra by varying plasma size following the work of Schupp \textit{et al.}\,\cite{Schupp2019b}. This is accomplished by irradiating droplets having diameters in the range 16--51\,\textmu m. \newpage \subsection{Scaling of peak optical depth with droplet size \\ and drive laser wavelength: examples} In our experiments the droplet diameter is changed in controlled steps from 16 to \SI{51}{\micro\meter} and a constant laser intensity is used for both laser wavelength cases. First, droplets are illuminated with 2-\textmu m laser light with an intensity of \SI{1.1E11}{\intensity}, close to optimal SP. The spot size is 65x88\,\textmu m. In Fig.\,\ref{fig:temp5} spectra for the smallest and largest droplet diameter are shown for both drive laser cases. With increasing droplet diameter the main emission feature at 13.5\,nm widens and more intense short wavelength radiation is emitted relative to the 13.5-nm peak. Second, the same scan is repeated with 1-\textmu m laser light at \SI{2.4E11}{\intensity}, an intensity chosen based on the intensity ratio in Fig.\,\ref{fig:temp2}(c). Again, the main emission feature at 13.5\,nm widens with increasing droplet diameter and more intense short wavelength radiation is emitted relative to the 13.5-nm peak. For the 1-\textmu m driver these effects however are much stronger. \begin{figure}[tb] \centering \includegraphics[scale=1]{droplet_size_MOPA_YAG.pdf} \caption{Spectral emission from tin plasmas produced with 1- and 2-\textmu m laser wavelength for small and large droplet diameters at laser intensities of 2.4 and \SI{1.1e11}{\intensity}, respectively.} \label{fig:temp5} \end{figure} In the following, the spectra are analyzed regarding their optical depth similar to the analysis in Ref.\,\onlinecite{Schupp2019b}. The wavelength-dependent optical depth $\tau_\lambda := \int \kappa_\lambda \rho dx$ is defined as the spatial integration over the product of the plasma's opacity $\kappa_\lambda$ and mass density $\rho$. In the instructive case of a one-dimensional plasma \cite{Bakshi2006} in local thermodynamic equilibrium (LTE), the spectral radiance is given by $L_\lambda = B_\lambda \left( 1 - e^{- \tau_{\lambda} } \right)$, where $B_\lambda$ is the Planck blackbody spectral radiance. We note that our high-density, strongly collisional 1- and 2-\textmu m driven plasmas are reasonably well approximated by LTE \cite{Torretti2020prominent}. At equal temperatures, and thus average charge state (recall $\bar{z}\approx 22.5 T^{0.6}$ \cite{Basko2015}), this equation enables each measured spectrum $\sim L_{\lambda,i}$ to be well approximated by any other spectrum $\sim L_{\lambda,j}$ when taking into account the ratio of the corresponding peak optical depths $a=\tau_{p,i}/\tau_{p,j}$ as a single parameter independent of wavelength (see Ref.\,\cite{Schupp2019b} and the Appendix for further details). Subsequently, if any peak optical depth $\tau_{p,j}$ is known in absolute terms, the optical depth of any other spectrum can be deduced. To be able to correct for systematic errors that could possibly occur for relatively low optical depth $\tau \lesssim 1$ we have suitably modified the equation used in Ref.\,\cite{Schupp2019b} as is detailed in the Appendix. As a reference spectrum, the spectrum measured at 1-\textmu m laser wavelength, 10-ns pulse duration and 30-\textmu m droplet size is chosen. The peak optical depth of this spectrum is determined by comparison of its 13.5-nm feature to opacity calculations in Ref.\,\cite{Torretti2020prominent}. More specifically, radiation transport is applied to the opacity spectrum calculated in Ref.\,\cite{Torretti2020prominent} for a here relevant mass density of $\rho=\SI{0.002}{g/cm^3}$ and electron temperature of $T_e=32$\,eV. The difference between radiation transported opacity spectrum and experimental spectrum is then minimized by changing the optical depth parameter $\tau_p$ in a least-square fit routine. This procedure leads to an absolute peak optical depth of $\tau_{0,p} = 4.5$ for our reference spectrum. \begin{figure}[tb] \centering \includegraphics[scale=1]{radiation_transport_scan4_30um_droplet.pdf} \caption{Spectrum produced with 2-\textmu m laser light (red line) compared to the radiation-transported reference spectrum for a peak optical depth value of $\tau_{p}=2.2$ (gray line, barely distinguishable from the red line). Reference and 2-\textmu m driven spectra were both obtained using a droplet diameter of 30\,\textmu m. Also shown is a spectrum obtained using a 10-\textmu m CO$_2$ laser \cite{Kerkhof2020} that represents the case of small optical depth. } \label{fig:temp3} \end{figure} Using Eq.\,\eqref{eqn:fit function_corrected} the peak optical depth $\tau_{i,p}$ of all spectra is fitted with respect to the reference spectrum. As expected, inserting the relative optical depth obtained from the fits into Eq.\,\eqref{eqn:fit function} leads to an excellent reproduction of the main emission feature, as is shown in Fig.\,\ref{fig:temp3} for a typical example spectrum (30-\textmu m droplet with a 2-\textmu m driver). A further reasonable reproduction of the 7 to 12\,nm features is established with the 2-\textmu m driver outperforming the model spectrum with respect to the amount of radiation emitted out-of-band. Fig.\,\ref{fig:temp3} also shows a spectrum from an industrial plasma produced by a 10-\textmu m CO$_2$ driver which represents the limiting case of low optical depth. The step from a 1-\textmu m to a 2-\textmu m driver clearly significantly enhances the spectrum. \subsection{Scaling of peak optical depth with droplet size \\ and drive laser wavelength: all results} Having demonstrated the ability of the model function to accurately reproduce spectra from a single reference spectrum, we show in Fig.\,\ref{fig:temp4}(a) the fitted values for all spectra of the droplet size scans for 1- and 2-\textmu m laser wavelength. In all cases the peak optical depth $ \tau_{i,p} $ appears to linearly increase with droplet diameter and to strongly depend on the laser wavelength. Indeed, the peak optical depth of the 2-\textmu m driven plasma lies roughly a factor of 2 below that of the 1-\textmu m one at largest droplet size, which may be expected from the lower plasma density (cf. Section\,\ref{sec:spectralscaling}). However, the 1-\textmu m results were obtained with 10-ns-long pulses and are here compared to the results from $\sim 5$-ns long, 2-\textmu m pulses, and optical depth is known to increase with pulse length \cite{Schupp2019,Schupp2019b}. To provide a comparison on more equal footing, we further compare in Fig.\,\ref{fig:temp4}(a) our results to previous data \cite{Schupp2019b}, obtained using a 1-\textmu m wavelength laser with a 5\,ns temporally box-shaped laser pulse. One of these data sets is taken with a spatially flattop laser profile of 96-\textmu m diameter \cite{Schupp2019,Schupp2019b} while the other one is taken with a Gaussian laser beam profile of 66\,\textmu m FWHM which more closely resembles the experimental conditions for the 2-\textmu m driver case. The spatial intensity distribution of the 1-\textmu m laser beam is seen to impact the effective optical depth (see also Ref.\,\cite{Schupp2019}). On comparison of the spectra for the 2- and 1-\textmu m cases at the most comparable temporal and spatial beam conditions, the clear reduction in peak optical depth parameter is maintained. This reduction, up to a factor 1.6 in optical depth becomes more pronounced at larger droplet diameters. The small deviation from the factor of $\sim$2 from the $\rho \sim \lambda^{-1}$ scaling may originate from differences in plasma length scales, plasma temperature, or from the finite laser intensity gradient over the plasma length scale. Nevertheless, a very significant reduction in optical depth of up to 40\,\% is demonstrated when using a 2-\textmu m laser to drive the plasma. \\ \begin{figure}[!tb] \centering \includegraphics[scale=1]{optical_depth_QR_base_with_SNS201811_v2.pdf} \caption{(a) Dependency of peak optical depth $ \tau_{i,p} $ on droplet diameter for 5- and 10-ns laser pulse duration at 1-\textmu m wavelength and for 4.3-ns pulse duration at 2-\textmu m wavelength. Circles indicate Gaussian spatial laser profile and boxes indicate a homogeneous 'flattop' laser beam profile. Peak optical depth is fitted with respect to the spectrum obtained at 1-\textmu m wavelength, 10-ns pulse duration and 30-\textmu m droplet diameter with optical depth of $\tau_{0,p}=4.5$. (b) Experimental values for spectral purity (SP) versus peak optical depth. The dashed line represents SP as calculated from the radiation-transported reference spectrum. The diamond symbol indicates the SP value of the radiation-transported reference spectrum for a peak optical depth value $\tau_{i,p}=0.4$, obtained from comparison of the reference spectrum with the emission of the CO$_2$-laser-driven plasma spectrum illustrated in Fig.\,\ref{fig:temp5}. } \label{fig:temp4} \end{figure} With peak optical depth being the pertinent scaling parameter of 1- and 2-\textmu m driven tin plasmas the corresponding spectral purity of the emission spectrum is related to it in Fig.\,\ref{fig:temp4}(b). All experimental SP values, calculated over the range of 5.5--\SI{25.5}{nm}, collapse onto the gray dashed curve obtained by calculating the SP of the radiation-transported reference spectrum. The 2-\textmu m case is slightly offset towards higher SP values because of the reduced emission in the 7 to 12\,nm wavelength band compared to the radiation transported reference spectrum (cf. Fig.\,\ref{fig:temp3}) that is not captured by the model with the same accuracy as that of the main emission feature at 13.5\,nm. This difference between model and experiment may point to a small overestimation of the optical depth of the 2-\textmu m-laser-produced tin plasma, which would explain both the observed overestimation of the short-wavelength out-of-band emission by the model as well as the offset in Fig.\,\ref{fig:temp4}(b). This small overestimation of the optical depth may in turn be due to a broader charge state distribution in our measurements of the 2-\textmu m case caused by, e.g., laser intensity gradients or the slightly lower beam pointing stability compared to the 1-\textmu m case. This observation leads us to expect an even lower optical depth in the 2-\textmu m case and brings our scaling ratio even closer to the expected factor 2 from $~\lambda^{-1}$ scaling. More importantly, it indicates that there are further opportunities for narrowing the charge state distribution by providing a more homogeneous heating of the plasma in time and space. Such a narrowing of the charge state distribution around the optimum charge states Sn$^{11+}$--Sn$^{14+}$ would lead to further improvements of SP and thus CE. \section{Conclusions} In conclusion, the effects of optical depth, plasma density, and laser intensity on the emission spectra of a 2-\textmu m-LPP source of tin microdroplets are investigated. The results are compared to the case of a 1-\textmu m driven plasma. It is found that the laser intensity required to maintain a common plasma temperature, scales approximately inversely with laser wavelength in going from 1- to 2-\textmu m drive laser, a result that will help defining development goals for future 2-\textmu m drive lasers for LPP light sources. The reciprocal scaling with laser wavelength ($\sim\lambda^{-1}$) has its origin in Kramers' law of inverse Bremsstrahlung, the main laser absorption mechanism in the tin plasmas investigated. Because of its reduced plasma density, the optical depth of the 2-\textmu m driven plasma is significantly reduced, allowing for efficient out-coupling of 13.5-nm radiation from the plasma even at larger plasma sizes. In future experiments it will be of interest to use large, pre-deformed targets and investigate the full CE potential of a 2-\textmu m source in a setting more similar to the current industrial one. Our results indicate that there are further opportunities for narrowing the charge state distribution by providing a more homogeneous heating of the plasma in time and space which would lead to further improvements of SP and thus CE. Looking further, it is of interest to experimentally investigate plasma generation using even longer-wavelength laser systems between 2 and 10\,\textmu m to find the mid-infrared wavelength optimally suited to drive EUV light sources at 13.5\,nm.\\ \section*{Acknowledgements} We thank Mikhail M. Basko for providing us with the RALEF-2D code and his advise aiding the simulation work presented in the paper. Further we thank the authors of Ref.\,\cite{Kerkhof2020} for providing us with the data for the CO$_2$ spectrum shown in Fig.\,\ref{fig:temp3}. This work has been carried out at the Advanced Research Center for Nanolithography (ARCNL), a public-private partnership of the University of Amsterdam (UvA), the Vrije Universiteit Amsterdam (VU), the Netherlands Organisation for Scientific Research (NWO) and the semiconductor equipment manufacturer ASML. The used transmission grating spectrometer has been developed in the Industrial Focus Group XUV Optics at University of Twente, and supported by the FOM Valorisation Prize 2011 awarded to F. Bijkerk and NanoNextNL Valorization Grant awarded to M. Bayraktar in 2015. This project has received funding from European Research Council (ERC) Starting Grant number 802648 and is part of the VIDI research programme with project number 15697, which is financed by NWO. \section*{References} \bibliographystyle{apsrev4-2} \input{main.bbl} \newpage \begin{appendix} \section*{Appendix} \subsection*{Radiation transport model} To determine peak optical depth in this work, the recorded spectra are analyzed in a manner similar to that presented in Ref.\,\onlinecite{Schupp2019b}. In the following, the method from Ref.\,\onlinecite{Schupp2019b} is first outlined briefly and is subsequently generalized for use with plasmas that are optically thin. The wavelength-dependent optical depth $\tau_\lambda := \int \kappa_\lambda \rho dx$ is defined as the spatial integration over the product of the plasma's opacity $\kappa_\lambda$ and mass density density $\rho$. The spectral radiance $L_\lambda$ of an extended one-dimensional plasma can be calculated by means of its optical depth as \cite{Bakshi2006} \begin{equation} \label{eqn:radiation transport} L_\lambda = S_\lambda \left( 1 - e^{- \tau_{\lambda} } \right). \end{equation} In local thermodynamic equilibrium (LTE), where collisional processes drive atomic level populations, the source function $S_\lambda$ equals the Planck blackbody function $B_\lambda$. Rearranging Eq.\,\eqref{eqn:radiation transport}, the optical depth of the recorded plasma spectrum can be obtained from its relative spectral radiance ${L_\lambda}/{B_\lambda}$ \begin{equation} \label{eqn:optical depth} \tau_\lambda = -\ln \left( 1 - \frac{L_\lambda}{B_\lambda} \right). \end{equation} The optical depths of two plasmas of similar temperatures, but with modestly different densities and length scales, may differ (in first approximation) only by a single wavelength-independent multiplicative factor $a_i$, relating the plasmas' optical depths via $\tau_{\lambda,i} = a_i \, \tau_{\lambda,0}$. Here $\tau_{0}$ and $\tau_{i}$ are the two wavelength-dependent optical depths of the reference spectrum and any other spectrum $i$, respectively. The relative spectral radiances of these two plasmas can be related to each other via Eq.\,\eqref{eqn:optical depth} \begin{equation} \label{eqn:fit function} \frac{L_{\lambda,i}}{B_{\lambda}} = 1 - \left( 1 - \frac{L_{\lambda,0}}{B_{\lambda}} \right)^{\tau_{i}/\tau_{0}}. \end{equation} In order to apply Eq.\,\eqref{eqn:fit function} to the spectra measured, the relative spectral radiance of the spectra must be known. To obtain the relative spectral radiance, the ratio of observed spectrum $O_{\lambda}$ (meaning the spectrum as recorded with the spectrometer) and blackbody function is normalized to the peak value at 13.5-nm wavelength (subscript $p$) by replacing $L$ with $\Tilde{L}_{\lambda} = O_{\lambda} B_{p} / O_{p}$. The normalized ratio $\Tilde{L}_{\lambda}/B_{\lambda}$ is then multiplied by the amplitude factor $1-e^{-\tau_{p}}$ obtained from Eq.\,\eqref{eqn:optical depth} \begin{equation} \label{eqn:fit function_corrected} \frac{\Tilde{L}_{\lambda,i}}{B_{\lambda}} = \frac{ 1 - \left( 1 - \frac{\Tilde{L}_{\lambda,0}}{B_{\lambda}} (1-e^{-\tau_{0,p}}) \right)^{\tau_{i,p}/\tau_{0,p}} } { 1-e^{-\tau_{i,p}} }. \end{equation} Note that the wavelength-dependent optical depth values ($\tau_{0,\lambda}$) from Eq.\,\eqref{eqn:fit function} have been exchanged by their peak values ($\tau_{0,p}$). This generalized equation allows for determination of peak optical depth in optically thin plasmas in LTE if the peak optical depth of one of the spectra is known. In the current analysis the use of Eq.\,\eqref{eqn:fit function_corrected} results in optical depth values that are mostly very similar, but some of which are up to 25\,\% lower for the smallest optical depths cases ($\tau \sim 2$), than when using Eq.\,\eqref{eqn:fit function}. Using Eq.\,\eqref{eqn:fit function_corrected} the peak optical depths $\tau_{i,p}$ of all spectra are fitted with respect to a reference spectrum of known peak optical depth (see main text). \end{appendix} \end{document}
{ "redpajama_set_name": "RedPajamaArXiv" }
6,125
Shangli är ett härad som lyder under Pingxiangs stad på prefekturnivå i Jiangxi-provinsen i sydöstra Kina. WP:Projekt Kina
{ "redpajama_set_name": "RedPajamaWikipedia" }
4,047