当前位置:网站首页>Proof of the third scene (f) in 22 years
Proof of the third scene (f) in 22 years
2022-07-28 17:16:00 【Wonderful sauce with pepper】
F topic
The question : Given an undirected graph , Ask two points each time x, y, Ask whether there is one n Permutation , Make the first element x, The last element is y, And any prefix of the arrangement 、 Any suffix is connected .
solution
( I found that I can't order double , Quickly get started with graph theory 555
It's not hard to think of something related to cutting points , But only part of it qaq
This question should start with a bit of dual nature
Disorderly classification and discussion
If uv Double at the same point , Bipartite property , Deleting any point can keep the connection , So direct yes.
If uv At different points, double , And a total of two points are double and adjacent .( Let's not consider the disconnected situation ).
It is also possible to construct permutations p 1 p 2 . . . p n p_1p_2...pn p1p2...pn Of , among p 1.. p i p1..pi p1..pi Belong to a dot double , p i + 1 . . . p n p_{i+1}...pn pi+1...pn Belong to another , u = p 1 , v = p n u=p_1,v=p_n u=p1,v=pn
If there are more pairs, consider how to construct , After using double shrinking points , It's a tree . because uv Must be at the beginning and end of the array , This tree must be in the form of a chain ,uv The point pair must be at the beginning and end of the chain . The conclusion feels good .
The counter evidence method randomly proves that this tree is a chain :
Suppose it's not a chain , There are at least three leaves , set up uv The dot pairs are U,V(U≠V), The other leaf is T. Might as well set U And T Of lca by LCA, We will first UV Path construction to permutation p in ,
p 1 . . . p i The corresponding is U − > L C A Points on this path are double p_1...p_i The corresponding is U->LCA Points on this path are double p1...pi The corresponding is U−>LCA Points on this path are double , p i + 1 . . . p n The corresponding is U − > L C A Points on this path are double p_{i+1}...p_n The corresponding is U->LCA Points on this path are double pi+1...pn The corresponding is U−>LCA Points on this path are double ,( Omission does not mean a series of consecutive subscripts )
There is still T->LCA The dot pairs on this path are not added to the arrangement , Consider if there is only T and LCA Two points , How to construct .
Because a point may belong to multiple point pairs at the same time , Suppose dot double LCA Middle link U, Connect T The point of (LCA,U,T It's a set of points !) Belong to at the same time LCA,U and T( But when shrinking, it can only be temporarily placed in a set , Let's say that now LCA This collection ), Because this situation can increase the connectivity between point pairs , Thus, it is easier to construct the arrangement ( Poor expression qaq), We set this key point as k spot .
Now? U To V This path has been placed in the arrangement , Consider joining T. Consider keeping the prefixes of the permutation connected , The best way is to join k after , Just put T In the point , hypothesis k There's one in the back T In the point q, Let's look at the permutation suffix , Suffix at this time V To T The paths are disconnected , because k stay q front !!!
Then the reasoning to the worse case can not be constructed !
Certificate completion
If uv If the dot pair is at the beginning and end , We need to make a special judgment uv It's the case of cutting points . After all, the above can only guarantee the construction of uv Separate arrangement , And make sure that uv Connectivity between .
Pay attention to special judgment n=2 The situation of , Always be yes.
边栏推荐
- SUSE CEPH add nodes, reduce nodes, delete OSD disks and other operations – storage6
- 总数据量超万亿行,玉溪卷烟厂通过正确选择时序数据库轻松应对
- Unity3d shader achieves ablation effect
- Hikvision responded to the impact of the 'US ban': there are options for the components currently used
- Problem solution of code heartstrings Junior Group (official competition) of Dalian University of Technology (Development Zone campus) in 2021
- Unity shader procedural texture
- RE14: reading paper illsi interpretable low resource legal decision making
- Shopee code League 2022 - qualification round p3.connecting the numbers (segment tree / bipartite graph determination, to be discussed)
- Unity editor learning (I) using features to change the display of fields in components
- Source code of voice live broadcast app
猜你喜欢

Goweb开发之Beego框架实战:第三节 程序执行流程分析

Re12: read these3 semantic self segmentation for abstract summary of long legal documents in low

MySQL installation tutorial

Unity shader cartoon style rendering

PostgreSQL weekly news - July 20, 2022
![[deep learning]: day 8 of pytorch introduction to project practice: weight decline (including source code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: day 8 of pytorch introduction to project practice: weight decline (including source code)

Goweb开发之Beego框架实战:第三节 程序执行流程分析

Realize the reset function of steering wheel UI with touch rotation and finger departure in unity

Goweb开发之Beego框架实战:第四节 数据库配置及连接

飞马D200S无人机与机载激光雷达在大比例尺DEM建设中的应用
随机推荐
Deep understanding of deepsea and salt deployment tools – storage6
3D modeling tool Archicad 26 newly released
Goweb开发之Beego框架实战:第四节 数据库配置及连接
Educational codeforces round 126 (rated for Div. 2) f.teleporters (two sets and two points)
Easypoi --- excel file export
[deep learning]: day 8 of pytorch introduction to project practice: weight decline (including source code)
总数据量超万亿行,玉溪卷烟厂通过正确选择时序数据库轻松应对
The maximum recommended number of rows for MySQL is 2000W. Is it reliable?
Question making note 3 (two point search)
Goweb开发之Beego框架实战:第四节 数据库配置及连接
Round 1C 2022 - Code jam 2022 b.square (Mathematics, thinking)
Unity shader realizes water wave effect with noise texture
华为Mate 40系列曝光:大曲率双曲面屏,5nm麒麟1020处理器!还将有天玑1000+的版本
Unity shader texture animation
Differences between CNSA and CASC and CASIC
Detailed steps for setting up SUSE storage6 environment – win10 + VMware Workstation
Visual Studio 2012/2015发布Web应用连同.cs源码一起发布
Codeforces round 768 (Div. 2) e.paint the middle (greedy / interval relationship processing)
全链路灰度在数据库上我们是怎么做的?
Codeworks round 801 (Div. 2) and epic Institute of technology round D. tree queries (tree DP)