当前位置:网站首页>【学习笔记】拟阵
【学习笔记】拟阵
2022-06-28 08:06:00 【仰望星空的蚂蚁】

对于这一类问题,有统一的解决方法,即 按照权值从大到小贪心 ,直到不能选为止。
常见的拟阵模型:
- 物品有 ( v i , w i ) (v_i,w_i) (vi,wi) 两个属性,选出一个集合 S S S ,求 max ( ∑ i ∈ S v i ) \max(\sum_{i\in S}v_i) max(∑i∈Svi) ,其中 S S S 的任意非空子集属性异或和 ≠ 0 \neq 0 =0 。
M(E,I) 中 E 表示 n 个物品组成的集合, I 表示满足任意非空子集属性和 ≠ 0 \neq 0 =0 的物品集合。
- MST 。
M(E,I) 中 E 表示边的集合, I 表示满足没有环的边的集合。
因为求的是 MST ,所以考虑 w ( u , v ) = w 0 − w ( u , v ) w(u,v)=w_0-w(u,v) w(u,v)=w0−w(u,v) ,注意我们求的必须是一个生成树,所以需要避免边的权值为负 。(否则可以选择不选)。
- 最小基环生成树 。
证明略。同样是按边排序贪心,证明可以反证(拟阵的证明过程比较麻烦)。
- 有 n n n 个向量 ( a 1 , a 2 , . . , a m ) (a_1,a_2,..,a_m) (a1,a2,..,am) ,每个向量有权值 v a l i val_i vali ,选出线性无关的向量集合 S ,在满足 |S| 最大的前提下求 min ( ∑ i ∈ S v a l i ) \min(\sum_{i\in S}val_i) min(∑i∈Svali) 。
这题可以转化为求 max ( ∑ i ∈ S v a l i ) \max(\sum_{i\in S}val_i) max(∑i∈Svali) ,因为权值为正,所以 S 一定是原拟阵的基,又因为拟阵的基大小相同(否则与交换性矛盾),所以直接把 v a l i val_i vali 从小到大排序贪心即可。
边栏推荐
- Uvcgan: unt vision transformer cycle-consistent Gan for unpropared image-to-image translation
- NLP sequence can completely simulate human brain intelligence
- MySQL tablespace parsing
- Prometheus + grafana + MySQL master-slave replication + host monitoring
- 同花顺注册开户靠谱吗?安全吗?
- Activity隐式跳转
- Redis implements distributed locks
- Is it reliable for the top ten securities companies to register and open accounts? Is it safe?
- 挖财注册开户靠谱吗?安全吗?
- Redis persistence problem and final solution
猜你喜欢

asp. Net registration page

sql主從複制搭建

图像翻译:UVCGAN: UNET VISION TRANSFORMER CYCLE-CONSISTENT GAN FOR UNPAIRED IMAGE-TO-IMAGE TRANSLATION

Section 5: zynq interrupt

Configuring multiple instances of MySQL under Linux

ZYNQ_ IIC read / write m24m01 record board status

Section 9: dual core startup of zynq

Redis implements distributed locks

GPIO configuration of SOC

ROS 笔记(09)— 参数的查询和设置
随机推荐
Is it reliable to open a new bond registration account? Is it safe?
Conversion between HJ integer and IP address
Connaissez - vous le protocole TCP (2)?
Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
Introduction to kubernetes (I)
[JS] - [DFS, BFS application] - learning notes
Kubernetes theoretical basis
Doris学习笔记之介绍、编译安装与部署
Section 5: zynq interrupt
ROS notes (09) - query and setting of parameters
Unity 获取当前物体正前方,一定角度、距离的坐标点
本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
asp. Net upload image path and image name
HJ字符个数统计
asp. Net to search products and realize paging function
Airflow2.1.1 summary of the pits stepped on in actual combat!!
The solution of "user account control to continue, please enter administrator user name and password" appears in win10 Professional Edition
【尚品汇】项目笔记
asp. Net datalist to display product information and pictures
HJ成绩排序